Merge remote-tracking branch 'LCTT/master' into 20160922-Annoying-Experiences-Every-Linux-Gamer-Never-Wanted

This commit is contained in:
Xingyu.Wang 2019-02-28 00:01:20 +08:00
commit 80e66df05c
22 changed files with 1710 additions and 477 deletions

View File

@ -0,0 +1,79 @@
[#]: collector: (lujun9972)
[#]: translator: (lujun9972)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10574-1.html)
[#]: subject: (Get started with Org mode without Emacs)
[#]: via: (https://opensource.com/article/19/1/productivity-tool-org-mode)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney))
开始使用 Org 模式吧,在没有 Emacs 的情况下
======
> 不,你不需要 Emacs 也能用 Org这是我开源工具系列的第 16 集,将会让你在 2019 年变得更加有生产率。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/web_browser_desktop_devlopment_design_system_computer.jpg?itok=pfqRrJgh)
每到年初似乎总有这么一个疯狂的冲动来寻找提高生产率的方法。新年决心,正确地开始一年的冲动,以及“向前看”的态度都是这种冲动的表现。软件推荐通常都会选择闭源和专利软件。但这不是必须的。
这是我 2019 年改进生产率的 19 个新工具中的第 16 个。
### Org (非 Emacs)
[Org 模式][1] (或者就称为 Org) 并不是新鲜货,但依然有许多人没有用过。他们很乐意试用一下以体验 Org 是如何改善生产率的。但最大的障碍来自于 Org 是与 Emacs 相关联的而且很多人都认为两者缺一不可。并不是这样的一旦你理解了其基础Org 就可以与各种其他工具和编辑器一起使用。
![](https://opensource.com/sites/default/files/uploads/org-1.png)
Org本质上是一个结构化的文本文件。它有标题、子标题以及各种关键字其他工具可以根据这些关键字将文件解析成日程表和代办列表。Org 文件可以被任何纯文本编辑器编辑(例如,[Vim][2]、[Atom][3] 或 [Visual Studio Code][4]),而且很多编辑器都有插件可以帮你创建和管理 Org 文件。
一个基础的 Org 文件看起来是这样的:
```
* Task List
** TODO Write Article for Day 16 - Org w/out emacs
   DEADLINE: <2019-01-25 12:00>
*** DONE Write sample org snippet for article
    - Include at least one TODO and one DONE item
    - Show notes
    - Show SCHEDULED and DEADLINE
*** TODO Take Screenshots
** Dentist Appointment
   SCHEDULED: <2019-01-31 13:30-14:30>
```
Org 是一种大纲格式,它使用 `*` 作为标识指明事项的级别。任何以 `TODO`(是的,全大些)开头的事项都是代办事项。标注为 `DONE` 的工作表示该工作已经完成。`SCHEDULED` 和 `DEADLINE` 标识与该事务相关的日期和时间。如何任何地方都没有时间,则该事务被视为全天活动。
使用正确的插件,你喜欢的文本编辑器可以成为一个充满生产率和组织能力的强大工具。例如,[vim-orgmode][5] 插件包括创建 Org 文件、语法高亮的功能,以及各种用来生成跨文件的日程和综合代办事项列表的关键命令。
![](https://opensource.com/sites/default/files/uploads/org-2.png)
Atom 的 [Organized][6] 插件可以在屏幕右边添加一个侧边栏,用来显示 Org 文件中的日程和代办事项。默认情况下它从配置项中设置的路径中读取多个 Org 文件。Todo 侧边栏允许你通过点击未完事项来将其标记为已完成,它会自动更新源 Org 文件。
![](https://opensource.com/sites/default/files/uploads/org-3.png)
还有一大堆 Org 工具可以帮助你保持生产率。使用 Python、Perl、PHP、NodeJS 等库,你可以开发自己的脚本和工具。当然,少不了 [Emacs][7],它的核心功能就包括支持 Org。
![](https://opensource.com/sites/default/files/uploads/org-4.png)
Org 模式是跟踪需要完成的工作和时间的最好工具之一。而且,与传闻相反,它无需 Emacs任何一个文本编辑器都行。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/productivity-tool-org-mode
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney (Kevin Sonney)
[b]: https://github.com/lujun9972
[1]: https://orgmode.org/
[2]: https://www.vim.org/
[3]: https://atom.io/
[4]: https://code.visualstudio.com/
[5]: https://github.com/jceb/vim-orgmode
[6]: https://atom.io/packages/organized
[7]: https://www.gnu.org/software/emacs/

View File

@ -1,5 +1,6 @@
Qalculate! 全宇宙最好的计算器软件
Qalculate! 全宇宙最好的计算器软件
======
十多年来,我一直都是 GNU-Linux 以及 [Debian][1] 的用户。随着我越来越频繁的使用桌面环境,我发现对我来说除了少数基于 web 的服务以外我的大多数需求都可以通过 Debian 软件库里自带的[桌面应用][2]解决。
我的需求之一就是进行单位换算。尽管有很多很多在线服务可以做这件事,但是我还是需要一个可以在桌面环境使用的应用。这主要是因为隐私问题以及我不想一而再再而三的寻找在线服务做事。为此我搜寻良久,直到找到 Qalculate!。
@ -12,15 +13,15 @@ Qalculate! 全宇宙最好的计算器软件
> 强大易用的桌面计算器 - GTK+ 版
>
> Qalculate! 是一款外表简单易用,内核强大且功能丰富的应用。其功能包含自定广义函数,单位,计算精度,作图以及可以输入一行表达式(有容错措施)的图形界面(也可以选择使用传统按钮)。
> Qalculate! 是一款外表简单易用,内核强大且功能丰富的应用。其功能包含自定义函数、单位、高计算精度、作图以及可以输入一行表达式(有容错措施)的图形界面(也可以选择使用传统按钮)。
这款应用也发行过 KDE 的界面,但是至少在 Debian Testing 软件库里,只出现了 GTK+ 版的界面,你也可以在 GitHub 上的这个[仓库][5]里面看到。
不必多说, Qalculate! 在 Debian 的软件源内处于可用状态,因此可以使用 [apt][6] 命令或者是基于 Debian 的发行版比如 Ubuntu 提供的软件中心轻松安装。在 Windows 或者 macOS 上也可以使用这款软件。
不必多说Qalculate! 在 Debian 的软件源内处于可用状态,因此可以使用 [apt][6] 命令或者是基于 Debian 的发行版比如 Ubuntu 提供的软件中心轻松安装。在 Windows 或者 macOS 上也可以使用这款软件。
### Qalculate! 特性一览
#### Qalculate! 特性一览
列出全部的功能清单会有点长,请允许我只列出一部分功能并使用截图来展示极少数 Qalculate! 提供的功能。这么做是为了让你熟悉 Qalculate! 的基本功能并在之后可以自由探索 Qalculate! 到底还能干什么。
列出全部的功能清单会有点长,请允许我只列出一部分功能并使用截图来展示极少数 Qalculate! 提供的功能。这么做是为了让你熟悉 Qalculate! 的基本功能并在之后可以自由探索 Qalculate! 到底还能干什么。
* 代数
* 微积分
@ -30,7 +31,7 @@ Qalculate! 全宇宙最好的计算器软件
* 日期与时间
* 经济学
* 对数和指数
* 集合
* 几何
* 逻辑学
* 向量和矩阵
* 杂项
@ -38,8 +39,6 @@ Qalculate! 全宇宙最好的计算器软件
* 统计学
* 三角学
#### 使用 Qalculate!
Qalculate! 的使用不是很难。你甚至可以在里面写简单的英文。但是我还是推荐先[阅读手册][7]以便充分发挥 Qalculate! 的潜能。
@ -51,48 +50,48 @@ Qalculate! 的使用不是很难。你甚至可以在里面写简单的英文。
#### qalc 是 Qalculate! 的命令行版
你也可以使用 Qalculate! 的命令行版 `qalc`
```
$ qalc 62499836 byte to gibibyte
62499836 * byte = approx. 0.058207508 gibibyte
$ qalc 40 degree celsius to fahrenheit
(40 * degree) * celsius = 104 deg*oF
```
Qalculate! 的命令行界面可以让不喜欢 GUI 而是喜欢命令行界面CLI或者是使用无头结点没有 GUI的人可以使用 Qalculate!。这些人大多是在服务器环境下工作。
如果你想要在脚本里使用这一软件的话,我想 libqalculate 是最好的解决方案。看一看 qalc 以及 qalculate-gtk 是如何依赖于它工作的就足以知晓如何使用了。
如果你想要在脚本里使用这一软件的话,我想 libqalculate 是最好的解决方案。看一看 `qalc` 以及 qalculate-gtk 是如何依赖于它工作的就足以知晓如何使用了。
再提一嘴,你还可以了解下如何根据一系列数据绘图,其他应用方式就留给你自己发掘了。不要忘记查看 /usr/share/doc/qalculate/index.html 以获取 Qalculate! 的全部功能。
再提一嘴,你还可以了解下如何根据一系列数据绘图,其他应用方式就留给你自己发掘了。不要忘记查看 `/usr/share/doc/qalculate/index.html` 以获取 Qalculate! 的全部功能。
注释:- 注意 Debian 更喜欢 [gnuplot][10],因为其输出的图片很精美。
注释注意 Debian 更喜欢 [gnuplot][10],因为其输出的图片很精美。
#### 额外贴士: 你可以通过在 Debian 下通过命令行感谢开发者
#### 附加技巧:你可以通过在 Debian 下通过命令行感谢开发者
如果你使用 Debian 而且喜欢哪个包的话,你可以使用如下命令感谢 Debian 下这个软件包的开发者或者是维护者:
```
reportbug --kudos $PACKAGENAME
```
因为我喜欢 Qalculate!,我想要对 Debian 的开发者以及维护者 Vincent Legout 的卓越工作表示感谢:
```
reportbug --kudos qalculate
```
建议各位阅读我写的关于如何使用报错工具的详细指南 [在 Debian 中上报 BUG][11].
建议各位阅读我写的关于如何使用报错工具[在 Debian 中上报 BUG][11]的详细指南。
#### 一位高分子化学家对 Qalculate! 的评价
经由作者 [Philip Prado][12],我们联系上了 Timothy Meyers 先生,他目前是在高分子实验室工作的高分子化学家。
他对 Qaclulate! 的专业评价是 -
他对 Qaclulate! 的专业评价是
> 看起来这个软件几乎任何科学家都可以使用,因为如果你直到指令以及如何使其生效的话,几乎任何数据计算都可以使用这个软件计算。
> 看起来几乎任何科学家都可以使用这个软件,因为如果你知道指令以及如何使其生效的话,几乎任何数据计算都可以使用这个软件计算。
> 我觉得这个软件少了些物理常数,但我想不起来缺了哪些。我觉得那里没有很多有关[流体动力学][13]的东西,再就是少了点部分化合物的[光吸收][14]系数,但这些东西只对我这个化学家来说比较重要,我不知道这些是不是对别人来说也是特别必要的。 自由能也许会这样
> 我觉得这个软件少了些物理常数,但我想不起来缺了哪些。我觉得它没有太多有关[流体动力学][13]的东西,再就是少了点部分化合物的[光吸收][14]系数,但这些东西只对我这个化学家来说比较重要,我不知道这些是不是对别人来说也是特别必要的。[自由能][15]可能也是
最后,我分享的关于 Qalculate! 的介绍十分简陋,其实际功能与你的需要以及你的想象力有关系。希望你能喜欢 Qalculate!
@ -103,20 +102,20 @@ via: https://itsfoss.com/qalculate/
作者:[Shirish][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[name1e5s](https://github.com/name1e5s)
校对:[校对者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/shirish/
[1]:https://www.debian.org/
[2]:https://itsfoss.com/essential-linux-applications/
[3]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/05/qalculate-app-featured-1-800x450.jpeg
[3]:https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/05/qalculate-app-featured-1.jpeg?w=800&ssl=1
[4]:https://qalculate.github.io/
[5]:https://github.com/Qalculate
[6]:https://itsfoss.com/apt-command-guide/
[7]:https://qalculate.github.io/manual/index.html
[8]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/04/qalculate-byte-conversion.png
[9]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/04/qalculate-gtk-weather-conversion.png
[8]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/04/qalculate-byte-conversion.png?zoom=2&ssl=1
[9]:https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/04/qalculate-gtk-weather-conversion.png?zoom=2&ssl=1
[10]:http://www.gnuplot.info/
[11]:https://itsfoss.com/bug-report-debian/
[12]:https://itsfoss.com/author/phillip/

View File

@ -1,18 +1,20 @@
[#]: collector: (lujun9972)
[#]: translator: (MjSeven)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-10573-1.html)
[#]: subject: (3 tools for viewing files at the command line)
[#]: via: (https://opensource.com/article/19/2/view-files-command-line)
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
在命令行查看文件的 3 个工具
======
看一下 less, Antiword 和 odt2xt 这三个实用程序,它们都可以在终端中查看文件。
> 看一下 `less`、Antiword 和 `odt2xt` 这三个实用程序,它们都可以在终端中查看文件。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command_line_prompt.png?itok=wbGiJ_yg)
我常说,你不需要使用命令行也可以高效使用 Linux - 我知道许多 Linux 用户从不打开终端窗口,并且他们也很高兴。然而,即使我不认为自己是一名技术人员,我也会在命令行上花费大约 20% 的计算时间,包括操作文件处理文本和使用实用程序。
我常说,你不需要使用命令行也可以高效使用 Linux —— 我知道许多 Linux 用户从不打开终端窗口,并且也用的挺好。然而,即使我不认为自己是一名技术人员,我也会在命令行上花费大约 20% 的计算时间,包括操作文件处理文本和使用实用程序。
我经常在终端窗口中做的一件事是查看文件,无论是文本还是需要用到文字处理器的文件。有时使用命令行实用程序比启动文本编辑器或文字处理器更容易。
@ -20,9 +22,9 @@
### less
[less][1] 的美妙之处在于它易于使用,它将你正在查看的文件分解为离散的块(或页面),这使得它们更易于阅读。你可以使用它在命令行查看文本文件,例如 READMEHTML 文件,LaTeX 文件或其他任何纯文本文件。我在[上一篇文章][2]中介绍了 less。
[less][1] 的美妙之处在于它易于使用,它将你正在查看的文件分解为块(或页面),这使得它们更易于阅读。你可以使用它在命令行查看文本文件,例如 README、HTML 文件、LaTeX 文件或其他任何纯文本文件。我在[上一篇文章][2]中介绍了 `less`
要使用 less只需输入
要使用 `less`,只需输入:
```
less file_name
@ -30,13 +32,13 @@ less file_name
![](https://opensource.com/sites/default/files/uploads/less.png)
通过按键盘上的空格键或 PgDn 键向下滚动文件,按 PgUp 键向上移动文件。要停止查看文件,按键盘上的 Q 键。
通过按键盘上的空格键或 `PgDn` 键向下滚动文件,按 `PgUp` 键向上移动文件。要停止查看文件,按键盘上的 `Q` 键。
### Antiword
[Antiword][3] 是一个很好地实用小程序,你可以使用它将 Word 文档转换为纯文本。只要你想,还可以将它们转换为 [PostScript][4] 或 [PDF][5]。在本文中,让我们继续使用文本转换。
Antiword 可以读取和转换 Word 2.0 到 2003 版本创建的文件(to 校正:这里 Word 2.0 应该是 2000 吧)。它不能读取 DOCX 文件 - 如果你尝试这样做Antiword 会显示一条错误消息,表明你尝试读取的是一个 ZIP 文件。这在技术上是正确的,但仍然令人沮丧。
Antiword 可以读取和转换 Word 2.0 到 2003 版本创建的文件(LCTT 译注:此处疑为 Word 2000因为 Word 2.0 for DOS 发布于 1984 年,而 WinWord 2.0 发布于 1991 年,都似乎太老了)。它不能读取 DOCX 文件 —— 如果你尝试这样做Antiword 会显示一条错误消息,表明你尝试读取的是一个 ZIP 文件。这在技术上是正确的,但仍然令人沮丧。
要使用 Antiword 查看 Word 文档,输入以下命令:
@ -44,13 +46,13 @@ Antiword 可以读取和转换 Word 2.0 到 2003 版本创建的文件to 校
antiword file_name.doc
```
Antiword 将文档转换为文本并显示在终端窗口中。不幸的是,它不能在终端中将文档分解成页面。不过,你可以将 Antiword 的输出重定向到 less 或 [more][6] 之类的实用程序,一遍对其进行分页。通过输入以下命令来执行此操作:
Antiword 将文档转换为文本并显示在终端窗口中。不幸的是,它不能在终端中将文档分解成页面。不过,你可以将 Antiword 的输出重定向到 `less` 或 [more][6] 之类的实用程序,一遍对其进行分页。通过输入以下命令来执行此操作:
```
antiword file_name.doc | less
```
如果你是命令行的新手,那么我告诉你 | 称为管道。这就是重定向。
如果你是命令行的新手,那么我告诉你 `|` 称为管道。这就是重定向。
![](https://opensource.com/sites/default/files/uploads/antiword.png)
@ -58,13 +60,13 @@ antiword file_name.doc | less
作为一个优秀的开源公民,你会希望尽可能多地使用开放格式。对于你的文字处理需求,你可能需要处理 [ODT][7] 文件(由诸如 LibreOffice Writer 和 AbiWord 等文字处理器使用)而不是 Word 文件。即使没有,也可能会遇到 ODT 文件。而且,即使你的计算机上没有安装 Writer 或 AbiWord也很容易在命令行中查看它们。
怎样做呢?用一个名叫 [odt2txt][8] 的实用小程序。正如你猜到的那样odt2txt 将 ODT 文件转换为纯文本。要使用它,运行以下命令:
怎样做呢?用一个名叫 [odt2txt][8] 的实用小程序。正如你猜到的那样,`odt2txt` 将 ODT 文件转换为纯文本。要使用它,运行以下命令:
```
odt2txt file_name.odt
```
与 Antiword 一样odt2txt 将文档转换为文本并在终端窗口中显示。和 Antiword 一样,它不会对文档进行分页。但是,你也可以使用以下命令将 odt2txt 的输出管道传输到 less 或 more 这样的实用程序中:
与 Antiword 一样,`odt2txt` 将文档转换为文本并在终端窗口中显示。和 Antiword 一样,它不会对文档进行分页。但是,你也可以使用以下命令将 `odt2txt` 的输出管道传输到 `less``more` 这样的实用程序中:
```
odt2txt file_name.odt | more
@ -80,8 +82,8 @@ via: https://opensource.com/article/19/2/view-files-command-line
作者:[Scott Nesbitt][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
译者:[MjSeven](https://github.com/MjSeven)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,296 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (lawyer The MIT License, Line by Line)
[#]: via: (https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html)
[#]: author: (Kyle E. Mitchell https://kemitchell.com/)
lawyer The MIT License, Line by Line
======
### The MIT License, Line by Line
[The MIT License][1] is the most popular open-source software license. Heres one read of it, line by line.
#### Read the License
If youre involved in open-source software and havent taken the time to read the license from top to bottom—its only 171 words—you need to do so now. Especially if licenses arent your day-to-day. Make a mental note of anything that seems off or unclear, and keep trucking. Ill repeat every word again, in chunks and in order, with context and commentary. But its important to have the whole in mind.
> The MIT License (MIT)
>
> Copyright (c) <year> <copyright holders>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.
The license is arranged in five paragraphs, but breaks down logically like this:
* **Header**
* **License Title** : “The MIT License”
* **Copyright Notice** : “Copyright (c) …”
* **License Grant** : “Permission is hereby granted …”
* **Grant Scope** : “… to deal in the Software …”
* **Conditions** : “… subject to …”
* **Attribution and Notice** : “The above … shall be included …”
* **Warranty Disclaimer** : “The software is provided as is …”
* **Limitation of Liability** : “In no event …”
Here we go:
#### Header
##### License Title
> The MIT License (MIT)
“The MIT License” is a not a single license, but a family of license forms derived from language prepared for releases from the Massachusetts Institute of Technology. It has seen a lot of changes over the years, both for the original projects that used it, and also as a model for other projects. The Fedora Project maintains a [kind of cabinet of MIT license curiosities][2], with insipid variations preserved in plain text like anatomical specimens in formaldehyde, tracing a wayward kind of evolution.
Fortunately, the [Open Source Initiative][3] and [Software Package Data eXchange][4] groups have standardized a generic MIT-style license form as “The MIT License”. OSI in turn has adopted SPDX standardized [string identifiers][5] for common open-source licenses, with `MIT` pointing unambiguously to the standardized form “MIT License”. If you want MIT-style terms for a new project, use [the standardized form][1].
Even if you include “The MIT License” or “SPDX:MIT” in a `LICENSE` file, any responsible reviewer will still run a comparison of the text against the standard form, just to be sure. While various license forms calling themselves “MIT License” vary only in minor details, the looseness of what counts as an “MIT License” has tempted some authors into adding bothersome “customizations”. The canonical horrible, no good, very bad example of this is [the JSON license][6], an MIT-family license plus “The Software shall be used for Good, not Evil.”. This kind of thing might be “very Crockford”. It is definitely a pain in the ass. Maybe the joke was supposed to be on the lawyers. But they laughed all the way to the bank.
Moral of the story: “MIT License” alone is ambiguous. Folks probably have a good idea what you mean by it, but youre only going to save everyone—yourself included—time by copying the text of the standard MIT License form into your project. If you use metadata, like the `license` property in package manager metadata files, to designate the `MIT` license, make sure your `LICENSE` file and any header comments use the standard form text. All of this can be [automated][7].
##### Copyright Notice
> Copyright (c) <year> <copyright holders>
Until the 1976 Copyright Act, United States copyright law required specific actions, called “formalities”, to secure copyright in creative works. If you didnt follow those formalities, your rights to sue others for unauthorized use of your work were limited, often completely lost. One of those formalities was “notice”: Putting marks on your work and otherwise making it known to the market that you were claiming copyright. The © is a standard symbol for marking copyrighted works, to give notice of copyright. The ASCII character set doesnt have the © symbol, but `Copyright (c)` gets the same point across.
The 1976 Copyright Act, which “implemented” many requirements of the international Berne Convention, eliminated formalities for securing copyright. At least in the United States, copyright holders still need to register their copyrighted works before suing for infringement, with potentially higher damages if they register before infringement begins. In practice, however, many register copyright right before bringing suit against someone in particular. You dont lose your copyright just by failing to put notices on it, registering, sending a copy to the Library of Congress, and so on.
Even if copyright notices arent as absolutely necessary as they used to be, they are still plenty useful. Stating the year a work was authored and who the copyright belonged to give some sense of when copyright in the work might expire, bringing the work into the public domain. The identity of the author or authors is also useful: United States law calculates copyright terms differently for individual and “corporate” authors. Especially in business use, it may also behoove a company to think twice about using software from a known competitor, even if the license terms give very generous permission. If youre hoping others will see your work and want to license it from you, copyright notices serve nicely for attribution.
As for “copyright holder”: Not all standard form licenses have a space to write this out. More recent license forms, like [Apache 2.0][8] and [GPL 3.0][9], publish `LICENSE` texts that are meant to be copied verbatim, with header comments and separate files elsewhere to indicate who owns copyright and is giving the license. Those approaches neatly discourage changes to the “standard” texts, accidental or intentional. They also make automated license identification more reliable.
The MIT License descends from language written for releases of code by institutions. For institutional releases, there was just one clear “copyright holder”, the institution releasing the code. Other institutions cribbed these licenses, replacing “MIT” with their own names, leading eventually to the generic forms we have now. This process repeated for other short-form institutional licenses of the era, notably the [original four-clause BSD License][10] for the University of California, Berkeley, now used in [three-clause][11] and [two-clause][12] variants, as well as [The ISC License][13] for the Internet Systems Consortium, an MIT variant.
In each case, the institution listed itself as the copyright holder in reliance on rules of copyright ownership, called “[works made for hire][14]” rules, that give employers and clients ownership of copyright in some work their employees and contractors do on their behalf. These rules dont usually apply to distributed collaborators submitting code voluntarily. This poses a problem for project-steward foundations, like the Apache Foundation and Eclipse Foundation, that accept contributions from a more diverse group of contributors. The usual foundation approach thus far has been to use a house license that states a single copyright holder—[Apache 2.0][8] and [EPL 1.0][15]—backed up by contributor license agreements—[Apache CLAs][16] and [Eclipse CLAs][17]—to collect rights from contributors. Collecting copyright ownership in one place is even more important under “copyleft” licenses like the GPL, which rely on copyright owners to enforce license conditions to promote software-freedom values.
These days, loads of projects without any kind of institutional or business steward use MIT-style license terms. SPDX and OSI have helped these use cases by standardizing forms of licenses like MIT and ISC that dont refer to a specific entity or institutional copyright holder. Armed with those forms, the prevailing practice of project authors is to fill their own name in the copyright notice of the form very early on … and maybe bump the year here and there. At least under United States copyright law, the resulting copyright notice doesnt give a full picture.
The original owner of a piece of software retains ownership of their work. But while MIT-style license terms give others rights to build on and change the software, creating what the law calls “derivative works”, they dont give the original author ownership of copyright in others contributions. Rather, each contributor has copyright in any [even marginally creative][18] work they make using the existing code as a starting point.
Most of these projects also balk at the idea of taking contributor license agreements, to say nothing of signed copyright assignments. Thats both naive and understandable. Despite the assumption of some newer open-source developers that sending a pull request on GitHub “automatically” licenses the contribution for distribution on the terms of the projects existing license, United States law doesnt recognize any such rule. Strong copyright protection, not permissive licensing, is the default.
Update: GitHub later changed its site-wide terms of service to include an attempt to flip this default, at least on GitHub.com. Ive written up some thoughts on that development, not all of them positive, in [another post][19].
To fill the gap between legally effective, well-documented grants of rights in contributions and no paper trail at all, some projects have adopted the [Developer Certificate of Origin][20], a standard statement contributors allude to using `Signed-Off-By` metadata tags in their Git commits. The Developer Certificate of Origin was developed for Linux kernel development in the wake of the infamous SCO lawsuits, which alleged that chunks of Linux code derived from SCO-owned Unix source. As a means of creating a paper trail showing that each line of Linux came from a contributor, the Developer Certificate of Origin functions nicely. While the Developer Certificate of Origin isnt a license, it does provide lots of good evidence that those submitting code expected the project to distribute their code, and for others to use it under the kernels existing license terms. The kernel also maintains a machine-readable `CREDITS` file listing contributors with name, affiliation, contribution area, and other metadata. Ive done [some][21] [experiments][22] adapting that approach for projects that dont use the kernels development flow.
#### License Grant
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”),
The meat of The MIT License is, you guessed it, a license. In general terms, a license is permission that one person or legal entity—the “licensor”—gives another—the “licensee”—to do something the law would otherwise let them sue for. The MIT License is a promise not to sue.
The law sometimes distinguishes licenses from promises to give licenses. If someone breaks a promise to give a license, you may be able to sue them for breaking their promise, but you may not end up with a license. “Hereby” is one of those hokey, archaic-sounding words lawyers just cant get rid of. Its used here to show that the license text itself gives the license, and not just a promise of a license. Its a legal [IIFE][23].
While many licenses give permission to a specific, named licensee, The MIT License is a “public license”. Public licenses give everybody—the public at large—permission. This is one of the three great ideas in open-source licensing. The MIT License captures this idea by giving a license “to any person obtaining a copy of … the Software”. As well see later, there is also a condition to receiving this license that ensures others will learn about their permission, too.
The parenthetical with a capitalized term in quotation marks (a “Definition”), is the standard way to give terms specific meanings in American-style legal documents. Courts will reliably look back to the terms of the definition when they see a defined, capitalized term used elsewhere in the document.
##### Grant Scope
> to deal in the Software without restriction,
From the licensees point of view, these are the seven most important words in The MIT License. The key legal concerns are getting sued for copyright infringement and getting sued for patent infringement. Neither copyright law nor patent law uses “to deal in” as a term of art; it has no specific meaning in court. As a result, any court deciding a dispute between a licensor and a licensee would ask what the parties meant and understood by this language. What the court will see is that the language is intentionally broad and open-ended. It gives licensees a strong argument against any claim by a licensor that they didnt give permission for the licensee to do that specific thing with the software, even if the thought clearly didnt occur to either side when the license was given.
> including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
No piece of legal writing is perfect, “fully settled in meaning”, or unmistakably clear. Beware anyone who pretends otherwise. This is the least perfect part of The MIT License. There are three main issues:
First, “including without limitation” is a legal antipattern. It crops up in any number of flavors:
* “including, without limitation”
* “including, without limiting the generality of the foregoing”
* “including, but not limited to”
* many, many pointless variations
All of these share a common purpose, and they all fail to achieve it reliably. Fundamentally, drafters who use them try to have their cake and eat it, too. In The MIT License, that means introducing specific examples of “dealing in the Software”—“use, copy, modify” and so on—without implying that licensee action has to be something like the examples given to count as “dealing in”. The trouble is that, if you end up needing a court to review and interpret the terms of a license, the court will see its job as finding out what those fighting meant by the language. If the court needs to decide what “deal in” means, it cannot “unsee” the examples, even if you tell it to. Id argue that “deal in the Software without restriction” alone would be better for licensees. Also shorter.
Second, the verbs given as examples of “deal in” are a hodgepodge. Some have specific meanings under copyright or patent law, others almost do or just plain dont:
* use appears in [United States Code title 35, section 271(a)][24], the patent laws list of what patent owners can sue others for doing without permission.
* copy appears in [United States Code title 17, section 106][25], the copyright laws list of what copyright owners can sue others for doing without permission.
* modify doesnt appear in either copyright or patent statute. It is probably closest to “prepare derivative works” under the copyright statute, but may also implicate improving or otherwise derivative inventions.
* merge doesnt appear in either copyright or patent statute. “Merger” has a specific meaning in copyright, but thats clearly not whats intended here. Rather, a court would probably read “merge” according to its meaning in industry, as in “to merge code”.
* publish doesnt appear in either copyright or patent statute. Since “the Software” is whats being published, it probably hews closest to “distribute” under the [copyright statute][25]. That statute also covers rights to perform and display works “publicly”, but those rights apply only to specific kinds of copyrighted work, like plays, sound recordings, and motion pictures.
* distribute appears in the [copyright statute][25].
* sublicense is a general term of intellectual property law. The right to sublicense means the right to give others licenses of their own, to do some or all of what you have permission to do. The MIT Licenses right to sublicense is actually somewhat unusual in open-source licenses generally. The norm is what Heather Meeker calls a “direct licensing” approach, where everyone who gets a copy of the software and its license terms gets a license direct from the owner. Anyone who might get a sublicense under the MIT License will probably end up with a copy of the license telling them they have a direct license, too.
* sell copies of is a mongrel. It is close to “offer to sell” and “sell” in the [patent statute][24], but refers to “copies”, a copyright concept. On the copyright side, it seems close to “distribute”, but the [copyright statute][25] makes no mention of sales.
* permit persons to whom the Software is furnished to do so seems redundant of “sublicense”. Its also unnecessary to the extent folks who get copies also get a direct license.
Lastly, as a result of this mishmash of legal, industry, general-intellectual-property, and general-use terms, it isnt clear whether The MIT License includes a patent license. The general language “deal in” and some of the example verbs, especially “use”, point toward a patent license, albeit a very unclear one. The fact that the license comes from the copyright holder, who may or may not have patent rights in inventions in the software, as well as most of the example verbs and the definition of “the Software” itself, all point strongly toward a copyright license. More recent permissive open-source licenses, like [Apache 2.0][8], address copyright, patent, and even trademark separately and specifically.
##### Three License Conditions
> subject to the following conditions:
Theres always a catch! MIT has three!
If you dont follow The MIT Licenses conditions, you dont get the permission the license offers. So failing to do what the conditions say at least theoretically leaves you open to a lawsuit, probably a copyright lawsuit.
Using the value of the software to the licensee to motivate compliance with conditions, even though the licensee paid nothing for the license, is the second great idea of open-source licensing. The last, not found in The MIT License, builds off license conditions: “Copyleft” licenses like the [GNU General Public License][9] use license conditions to control how those making changes can license and distribute their changed versions.
##### Notice Condition
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
If you give someone a copy of the software, you need to include the license text and any copyright notice. This serves a few critical purposes:
1. Gives others notice that they have permission for the software under the public license. This is a key part of the direct-licensing model, where each user gets a license direct from the copyright holder.
2. Makes known whos behind the software, so they can be showered in praises, glory, and cold, hard cash donations.
3. Ensures the warranty disclaimer and limitation of liability (coming up next) follow the software around. Everyone who gets a copy should get a copy of those licensor protections, too.
Theres nothing to stop you charging for providing a copy, or even a copy in compiled form, without source code. But when you do, you cant pretend that the MIT code is your own proprietary code, or provided under some other license. Those receiving get to know their rights under the “public license”.
Frankly, compliance with this condition is breaking down. Nearly every open-source license has such an “attribution” condition. Makers of system and installed software often understand theyll need to compile a notices file or “license information” screen, with copies of license texts for libraries and components, for each release of their own. The project-steward foundations have been instrumental in teaching those practices. But web developers, as a whole, havent got the memo. It cant be explained away by a lack of tooling—there is plenty—or the highly modular nature of packages from npm and other repositories—which uniformly standardize metadata formats for license information. All the good JavaScript minifiers have command-line flags for preserving license header comments. Other tools will concatenate `LICENSE` files from package trees. Theres really no excuse.
##### Warranty Disclaimer
> The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.
Nearly every state in the United States has enacted a version of the Uniform Commercial Code, a model statute of laws governing commercial transactions. Article 2 of the UCC—“Division 2” in California—governs contracts for sales of goods, from used automobiles bought off the lot to large shipments of industrial chemicals to manufacturing plants.
Some of the UCCs rules about sales contracts are mandatory. These rules always apply, whether those buying and selling like them or not. Others are just “defaults”. Unless buyers and sellers opt out in writing, the UCC implies that they want the baseline rule found in the UCCs text for their deal. Among the default rules are implied “warranties”, or promises by sellers to buyers about the quality and usability of the goods being sold.
There is a big theoretical debate about whether public licenses like The MIT License are contracts—enforceable agreements between licensors and licensees—or just licenses, which go one way, but may come with strings attached, their conditions. There is less debate about whether software counts as “goods”, triggering the UCCs rules. There is no debate among licensors on liability: They dont want to get sued for lots of money if the software they give away for free breaks, causes problems, doesnt work, or otherwise causes trouble. Thats exactly the opposite of what three default rules for “implied warranties” do:
1. The implied warranty of “merchantability” under [UCC section 2-314][26] is a promise that “the goods”—the Software—are of at least average quality, properly packaged and labeled, and fit for the ordinary purposes they are intended to serve. This warranty applies only if the one giving the software is a “merchant” with respect to the software, meaning they deal in software and hold themselves out as skilled in software.
2. The implied warranty of “fitness for a particular purpose” under [UCC section 2-315][27] kicks in when the seller knows the buyer is relying on them to provide goods for a particular purpose. The goods need to actually be “fit” for that purpose.
3. The implied warranty of “noninfringement” is not part of the UCC, but is a common feature of general contract law. This implied promise protects the buyer if it turns out the goods they received infringe somebody elses intellectual property rights. That would be the case if the software under The MIT License didnt actually belong to the one trying to license it, or if it fell under a patent owned by someone else.
[Section 2-316(3)][28] of the UCC requires language opting out of, or “excluding”, implied warranties of merchantability and fitness for a particular purpose to be conspicuous. “Conspicuous” in turn means written or formatted to call attention to itself, the opposite of microscopic fine print meant to slip past unwary consumers. State law may impose a similar attention-grabbing requirement for disclaimers of noninfringement.
Lawyers have long suffered under the delusion that writing anything in `ALL-CAPS` meets the conspicuous requirement. That isnt true. Courts have criticized the Bar for pretending as much, and most everyone agrees all-caps does more to discourage reading than compel it. All the same, most open-source-license forms set their warranty disclaimers in all-caps, in part because thats the only obvious way to make it stand out in plain-text `LICENSE` files. Id prefer to use asterisks or other ASCII art, but that ship sailed long, long ago.
##### Limitation of Liability
> In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software.
The MIT License gives permission for software “free of charge”, but the law does not assume that folks receiving licenses free of charge give up their rights to sue when things go wrong and the licensor is to blame. “Limitations of liability”, often paired with “damages exclusions”, work a lot like licenses, as promises not to sue. But these are protections for the licensor against lawsuits by licensees.
In general, courts read limitations of liability and damages exclusions warily, since they can shift an incredible amount of risk from one side to another. To protect the communitys vital interest in giving folks a way to redress wrongs done in court, they “strictly construe” language limiting liability, reading it against the one protected by it where possible. Limitations of liability have to be specific to stand up. Especially in “consumer” contracts and other situations where those giving up the right to sue lack sophistication or bargaining power, courts have sometimes refused to honor language that seemed buried out of sight. Partly for that reason, partly by sheer force of habit, lawyers tend to give limits of liability the all-caps treatment, too.
Drilling down a bit, the “limitation of liability” part is a cap on the amount of money a licensee can sue for. In open-source licenses, that limit is always no money at all, $0, “not liable”. By contrast, in commercial licenses, its often a multiple of license fees paid in the last 12-month period, though its often negotiated.
The “exclusion” part lists, specifically, kinds of legal claims—reasons to sue for damages—the licensor cannot use. Like many, many legal forms, The MIT License mentions actions “of contract”—for breaching a contract—and “of tort”. Tort rules are general rules against carelessly or maliciously harming others. If you run someone down on the road while texting, you have committed a tort. If your company sells faulty headphones that burn peoples ears off, your company has committed a tort. If a contract doesnt specifically exclude tort claims, courts sometimes read exclusion language in a contract to prevent only contract claims. For good measure, The MIT License throws in “or otherwise”, just to catch the odd admiralty law or other, exotic kind of legal claim.
The phrase “arising from, out of or in connection with” is a recurring tick symptomatic of the legal draftsmans inherent, anxious insecurity. The point is that any lawsuit having anything to do with the software is covered by the limitation and exclusions. On the off chance something can “arise from”, but not “out of”, or “in connection with”, it feels better to have all three in the form, so pack em in. Never mind that any court forced to split hairs in this part of the form will have to come up with different meanings for each, on the assumption that a professional drafter wouldnt use different words in a row to mean the same thing. Never mind that in practice, where courts dont feel good about a limitation thats disfavored to begin with, theyll be more than ready to read the scope trigger narrowly. But I digress. The same language appears in literally millions of contracts.
#### Overall
All these quibbles are a bit like spitting out gum on the way into church. The MIT License is a legal classic. The MIT License works. It is by no means a panacea for all software IP ills, in particular the software patent scourge, which it predates by decades. But MIT-style licenses have served admirably, fulfilling a narrow purpose—reversing troublesome default rules of copyright, sales, and contract law—with a minimal combination of discreet legal tools. In the greater context of computing, its longevity is astounding. The MIT License has outlasted and will outlast the vast majority of software licensed under it. We can only guess how many decades of faithful legal service it will have given when it finally loses favor. Its been especially generous to those who couldnt have afforded their own lawyer.
Weve seen how the The MIT License we know today is a specific, standardized set of terms, bringing order at long last to a chaos of institution-specific, haphazard variations.
Weve seen how its approach to attribution and copyright notice informed intellectual property management practices for academic, standards, commercial, and foundation institutions.
Weve seen how The MIT Licenses grants permission for software to all, for free, subject to conditions that protect licensors from warranties and liability.
Weve seen that despite some crusty verbiage and lawyerly affectation, one hundred and seventy one little words can get a hell of a lot of legal work done, clearing a path for open-source software through a dense underbrush of intellectual property and contract.
Im so grateful for all whove taken the time to read this rather long post, to let me know they found it useful, and to help improve it. As always, I welcome your comments via [e-mail][29], [Twitter][30], and [GitHub][31].
A number of folks have asked where they can read more, or find run-downs of other licenses, like the GNU General Public License or the Apache 2.0 license. No matter what your particular continuing interest may be, I heartily recommend the following books:
* Andrew M. St. Laurents [Understanding Open Source & Free Software Licensing][32], from OReilly.
I start with this one because, while its somewhat dated, its approach is also closest to the line-by-line approach used above. OReilly has made it [available online][33].
* Heather Meekers [Open (Source) for Business][34]
In my opinion, by far the best writing on the GNU General Public License and copyleft more generally. This book covers the history, the licenses, their development, as well as compatibility and compliance. Its the book I lend to clients considering or dealing with the GPL.
* Larry Rosens [Open Source Licensing][35], from Prentice Hall.
A great first book, also available for free [online][36]. This is the best introduction to open-source licensing and related law for programmers starting from scratch. This one is also a bit dated in some specific details, but Larrys taxonomy of licenses and succinct summary of open-source business models stand the test of time.
All of these were crucial to my own education as an open-source licensing lawyer. Their authors are professional heroes of mine. Have a read! — K.E.M
I license this article under a [Creative Commons Attribution-ShareAlike 4.0 license][37].
--------------------------------------------------------------------------------
via: https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html
作者:[Kyle E. Mitchell][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://kemitchell.com/
[b]: https://github.com/lujun9972
[1]: http://spdx.org/licenses/MIT
[2]: https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT
[3]: https://opensource.org
[4]: https://spdx.org
[5]: http://spdx.org/licenses/
[6]: https://spdx.org/licenses/JSON
[7]: https://www.npmjs.com/package/licensor
[8]: https://www.apache.org/licenses/LICENSE-2.0
[9]: https://www.gnu.org/licenses/gpl-3.0.en.html
[10]: http://spdx.org/licenses/BSD-4-Clause
[11]: https://spdx.org/licenses/BSD-3-Clause
[12]: https://spdx.org/licenses/BSD-2-Clause
[13]: http://www.isc.org/downloads/software-support-policy/isc-license/
[14]: http://worksmadeforhire.com/
[15]: https://www.eclipse.org/legal/epl-v10.html
[16]: https://www.apache.org/licenses/#clas
[17]: https://wiki.eclipse.org/ECA
[18]: https://en.wikipedia.org/wiki/Feist_Publications,_Inc.,_v._Rural_Telephone_Service_Co.
[19]: https://writing.kemitchell.com/2017/02/16/Against-Legislating-the-Nonobvious.html
[20]: http://developercertificate.org/
[21]: https://github.com/berneout/berneout-pledge
[22]: https://github.com/berneout/authors-certificate
[23]: https://en.wikipedia.org/wiki/Immediately-invoked_function_expression
[24]: https://www.govinfo.gov/app/details/USCODE-2017-title35/USCODE-2017-title35-partIII-chap28-sec271
[25]: https://www.govinfo.gov/app/details/USCODE-2017-title17/USCODE-2017-title17-chap1-sec106
[26]: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=2314.&lawCode=COM
[27]: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=2315.&lawCode=COM
[28]: https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=2316.&lawCode=COM
[29]: mailto:kyle@kemitchell.com
[30]: https://twitter.com/kemitchell
[31]: https://github.com/kemitchell/writing/tree/master/_posts/2016-09-21-MIT-License-Line-by-Line.md
[32]: https://lccn.loc.gov/2006281092
[33]: http://www.oreilly.com/openbook/osfreesoft/book/
[34]: https://www.amazon.com/dp/1511617772
[35]: https://lccn.loc.gov/2004050558
[36]: http://www.rosenlaw.com/oslbook.htm
[37]: https://creativecommons.org/licenses/by-sa/4.0/legalcode

View File

@ -1,3 +1,4 @@
tomjlw is translating
Ick: a continuous integration system
======
**TL;DR:** Ick is a continuous integration or CI system. See <http://ick.liw.fi/> for more information.

View File

@ -1,79 +0,0 @@
tomjlw is translating
3 open source tools for scientific publishing
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_science.png?itok=WDKARWGV)
One industry that lags behind others in the adoption of digital or open source tools is the competitive and lucrative world of scientific publishing. Worth over £19B ($26B) annually, according to figures published by Stephen Buranyi in [The Guardian][1] last year, the system for selecting, publishing, and sharing even the most important scientific research today still bears many of the constraints of print media. New digital-era technologies present a huge opportunity to accelerate discovery, make science collaborative instead of competitive, and redirect investments from infrastructure development into research that benefits society.
The non-profit [eLife initiative][2] was established by the funders of research, in part to encourage the use of these technologies to this end. In addition to publishing an open-access journal for important advances in life science and biomedical research, eLife has made itself into a platform for experimentation and showcasing innovation in research communication—with most of this experimentation based around the open source ethos.
Working on open publishing infrastructure projects gives us the opportunity to accelerate the reach and adoption of the types of technology and user experience (UX) best practices that we consider important to the advancement of the academic publishing industry. Speaking very generally, the UX of open source products is often left undeveloped, which can in some cases dissuade people from using it. As part of our investment in OSS development, we place a strong emphasis on UX in order to encourage users to adopt these products.
All of our code is open source, and we actively encourage community involvement in our projects, which to us means faster iteration, more experimentation, greater transparency, and increased reach for our work.
The projects that we are involved in, such as the development of Libero (formerly known as [eLife Continuum][3]) and the [Reproducible Document Stack][4], along with our recent collaboration with [Hypothesis][5], show how OSS can be used to bring about positive changes in the assessment, publication, and communication of new discoveries.
### Libero
Libero is a suite of services and applications available to publishers that includes a post-production publishing system, a full front-end user interface pattern suite, Libero's Lens Reader, an open API, and search and recommendation engines.
Last year, we took a user-driven approach to redesigning the front end of Libero, resulting in less distracting site “furniture” and a greater focus on research articles. We tested and iterated all the key functional areas of the site with members of the eLife community to ensure the best possible reading experience for everyone. The sites new API also provides simpler access to content for machine readability, including text mining, machine learning, and online application development.
The content on our website and the patterns that drive the new design are all open source to encourage future product development for both eLife and other publishers that wish to use it.
### The Reproducible Document Stack
In collaboration with [Substance][6] and [Stencila][7], eLife is also engaged in a project to create a Reproducible Document Stack (RDS)—an open stack of tools for authoring, compiling, and publishing computationally reproducible manuscripts online.
Today, an increasing number of researchers are able to document their computational experiments through languages such as [R Markdown][8] and [Python][9]. These can serve as important parts of the experimental record, and while they can be shared independently from or alongside the resulting research article, traditional publishing workflows tend to relegate these assets as a secondary class of content. To publish papers, researchers using these languages often have little option but to submit their computational results as “flattened” outputs in the form of figures, losing much of the value and reusability of the code and data references used in the computation. And while electronic notebook solutions such as [Jupyter][10] can enable researchers to publish their code in an easily reusable and executable form, thats still in addition to, rather than as an integral part of, the published manuscript.
The [Reproducible Document Stack][11] project aims to address these challenges through development and publication of a working prototype of a reproducible manuscript that treats code and data as integral parts of the document, demonstrating a complete end-to-end technology stack from authoring through to publication. It will ultimately allow authors to submit their manuscripts in a format that includes embedded code blocks and computed outputs (statistical results, tables, or graphs), and have those assets remain both visible and executable throughout the publication process. Publishers will then be able to preserve these assets directly as integral parts of the published online article.
### Open annotation with Hypothesis
Most recently, we introduced open annotation in collaboration with [Hypothesis][12] to enable users of our website to make comments, highlight important sections of articles, and engage with the reading public online.
Through this collaboration, the open source Hypothesis software was customized with new moderation features, single sign-on authentication, and user-interface customization options, giving publishers more control over its implementation on their sites. These enhancements are already driving higher-quality discussions around published scholarly content.
The tool can be integrated seamlessly into publishers websites, with the scholarly publishing platform [PubFactory][13] and content solutions provider [Ingenta][14] already taking advantage of its improved feature set. [HighWire][15] and [Silverchair][16] are also offering their publishers the opportunity to implement the service.
### Other industries and open source
Over time, we hope to see more publishers adopt Hypothesis, Libero, and other projects to help them foster the discovery and reuse of important scientific research. But the opportunities for innovation eLife has been able to leverage because of these and other OSS technologies are also prevalent in other industries.
The world of data science would be nowhere without the high-quality, well-supported open source software and the communities built around it; [TensorFlow][17] is a leading example of this. Thanks to OSS and its communities, all areas of AI and machine learning have seen rapid acceleration and advancement compared to other areas of computing. Similar is the explosion in usage of Linux as a cloud web host, followed by containerization with Docker, and now the growth of Kubernetes, one of the most popular open source projects on GitHub.
All of these technologies enable organizations to do more with less and focus on innovation instead of reinventing the wheel. And in the end, thats the real benefit of OSS: It lets us all learn from each others failures while building on each other's successes.
We are always on the lookout for opportunities to engage with the best emerging talent and ideas at the interface of research and technology. Find out more about some of these engagements on [eLife Labs][18], or contact [innovation@elifesciences.org][19] for more information.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/scientific-publishing-software
作者:[Paul Shanno][a]
译者:[tomjlw](https://github.com/tomjlw)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/pshannon
[1]:https://www.theguardian.com/science/2017/jun/27/profitable-business-scientific-publishing-bad-for-science
[2]:https://elifesciences.org/about
[3]:https://elifesciences.org/inside-elife/33e4127f/elife-introduces-continuum-a-new-open-source-tool-for-publishing
[4]:https://elifesciences.org/for-the-press/e6038800/elife-supports-development-of-open-technology-stack-for-publishing-reproducible-manuscripts-online
[5]:https://elifesciences.org/for-the-press/81d42f7d/elife-enhances-open-annotation-with-hypothesis-to-promote-scientific-discussion-online
[6]:https://github.com/substance
[7]:https://github.com/stencila/stencila
[8]:https://rmarkdown.rstudio.com/
[9]:https://www.python.org/
[10]:http://jupyter.org/
[11]:https://elifesciences.org/labs/7dbeb390/reproducible-document-stack-supporting-the-next-generation-research-article
[12]:https://github.com/hypothesis
[13]:http://www.pubfactory.com/
[14]:http://www.ingenta.com/
[15]:https://github.com/highwire
[16]:https://www.silverchair.com/community/silverchair-universe/hypothesis/
[17]:https://www.tensorflow.org/
[18]:https://elifesciences.org/labs
[19]:mailto:innovation@elifesciences.org

View File

@ -0,0 +1,76 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Modularity in Fedora 28 Server Edition)
[#]: via: (https://fedoramagazine.org/wp-content/uploads/2018/05/f28-server-modularity-816x345.jpg)
[#]: author: (Stephen Gallagher https://fedoramagazine.org/author/sgallagh/)
Modularity in Fedora 28 Server Edition
======
![](https://fedoramagazine.org/wp-content/uploads/2018/05/f28-server-modularity-816x345.jpg)
### What is Modularity?
A classic conundrum that all open-source distributions have faced is the “too fast/too slow” problem. Users install an operating system in order to enable the use of their applications. A comprehensive distribution like Fedora has an advantage and a disadvantage to the large amount of available software. While the package the user wants may be available, it might not be available in the version needed. Heres how Modularity can help solve that problem.
Fedora sometimes moves too fast for some users. Its rapid release cycle and desire to carry the latest stable software can result in breaking compatibility with applications. If a user cant run a web application because Fedora upgraded a web framework to an incompatible version, it can be very frustrating. The classic answer to the “too fast” problem has been “Fedora should have an LTS release.” However, this approach only solves half the problem and makes the flip side of this conundrum worse.
There are also times when Fedora moves too slowly for some of its users. For example, a Fedora release may be poorly-timed alongside the release of other desirable software. Once a Fedora release is declared stable, packagers must abide by the [Stable Updates Policy][1] and not introduce incompatible changes into the system.
Fedora Modularity addresses both sides of this problem. Fedora will still ship a standard release under its traditional policy. However, it will also ship a set of modules that define alternative versions of popular software. Those in the “too fast” camp still have the benefit of Fedoras newer kernel and other general platform enhancements. In addition, they still have access to older frameworks or toolchains that support their applications.
In addition, those users who like to live closer to the edge can access newer software than was available at release time.
### What is Modularity not?
Modularity is not a drop-in replacement for [Software Collections][2]. These two technologies try to solve many of the same problems, but have distinct differences.
Software Collections install different versions of packages in parallel on the system. However, their downside is that each installation exists in its own namespaced portion of the filesystem. Furthermore, each application that relies on them needs to be told where to find them.
With Modularity, only one version of a package exists on the system, but the user can choose which one. The advantage is that this version lives in a standard location on the system. The package requires no special changes to applications that rely on it. Feedback from user studies shows most users dont actually rely on parallel installation. Containerization and virtualization solve that problem.
### Why not just use containers?
This is another common question. Why would a user want modules when they could just use containers? The answer is, someone still has to maintain the software in the containers. Modules provide pre-packaged content for those containers that users dont need to maintain, update and patch on their own. This is how Fedora takes the traditional value of a distribution and moves it into the new, containerized world.
Heres an example of how Modularity solves problems for users of Node.js and Review Board.
### Node.js
Many readers may be familiar with Node.js, a popular server-side JavaScript runtime. Node.js has an even/odd release policy. Its community supports even-numbered releases (6.x, 8.x, 10.x, etc.) for around 30 months. Meanwhile, they support odd-numbered releases that are essentially developer previews for 9 months.
Due to this cycle, Fedora carried only the most recent even-numbered version of Node.js in its stable repositories. It avoided the odd-numbered versions entirely since their lifecycle was shorter than Fedora, and generally not aligned with a Fedora release. This didnt sit well with some Fedora users, who wanted access to the latest and greatest enhancements.
Thanks to Modularity, Fedora 28 shipped with not just one, but three versions of Node.js to satisfy both developers and stable deployments. Fedora 28s traditional repository shipped with Node.js 8.x. This version was the most recent long-term stable version at release time. The Modular repositories (available by default on Fedora 28 Server edition) also made the older Node.js 6.x release and the newer Node.js 9.x development release available.
Additionally, Node.js released 10.x upstream just days after Fedora 28\. In the past, users who wanted to deploy that version had to wait until Fedora 29, or use sources from outside Fedora. However, thanks again to Modularity, Node.js 10.x is already [available][3] in the Modular Updates-Testing repository for Fedora 28.
### Review Board
Review Board is a popular Django application for performing code reviews. Fedora included Review Board from Fedora 13 all the way until Fedora 21\. At that point, Fedora moved to Django 1.7\. Review Board was unable to keep up, due to backwards-incompatible changes in Djangos database support. It remained alive in EPEL for RHEL/CentOS 7, simply because those releases had fortunately frozen on Django 1.6\. Nevertheless, its time in Fedora was apparently over.
However, with the advent of Modularity, Fedora could again ship the older Django as a non-default module stream. As a result, Review Board has been restored to Fedora as a module. Fedora carries both supported releases from upstream: 2.5.x and 3.0.x.
### Putting the pieces together
Fedora has always provided users with a wide range of software to use. Fedora Modularity now provides them with deeper choices for which versions of the software they need. The next few years will be very exciting for Fedora, as developers and users start putting together their software in new and exciting (or old and exciting) ways.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/wp-content/uploads/2018/05/f28-server-modularity-816x345.jpg
作者:[Stephen Gallagher][a]
选题:[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/sgallagh/
[b]: https://github.com/lujun9972
[1]: https://fedoraproject.org/wiki/Updates_Policy#Stable_Releases
[2]: https://www.softwarecollections.org
[3]: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2018-2b0846cb86

View File

@ -1,3 +1,11 @@
[#]: collector: (lujun9972)
[#]: translator: (runningwater)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What a shell dotfile can do for you)
[#]: via: (https://opensource.com/article/18/9/shell-dotfile)
[#]: author: (H.Waldo Grunenwald https://opensource.com/users/gwaldo)
What a shell dotfile can do for you
======
@ -223,7 +231,7 @@ via: https://opensource.com/article/18/9/shell-dotfile
作者:[H.Waldo Grunenwald][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者ID](https://github.com/译者ID)
译者:[runningwater](https://github.com/runningwater)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,62 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (lujun9972)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Schedule a visit with the Emacs psychiatrist)
[#]: via: (https://opensource.com/article/18/12/linux-toy-eliza)
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
Schedule a visit with the Emacs psychiatrist
======
Eliza is a natural language processing chatbot hidden inside of one of Linux's most popular text editors.
![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-eliza.png?itok=3ioiBik_)
Welcome to another day of the 24-day-long Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself what a command-line toy even is. Were figuring that out as we go, but generally, it could be a game, or any simple diversion that helps you have fun at the terminal.
Some of you will have seen various selections from our calendar before, but we hope theres at least one new thing for everyone.
Today's selection is a hidden gem inside of Emacs: Eliza, the Rogerian psychotherapist, a terminal toy ready to listen to everything you have to say.
A brief aside: While this toy is amusing, your health is no laughing matter. Please take care of yourself this holiday season, physically and mentally, and if stress and anxiety from the holidays are having a negative impact on your wellbeing, please consider seeing a professional for guidance. It really can help.
To launch [Eliza][1], first, you'll need to launch Emacs. There's a good chance Emacs is already installed on your system, but if it's not, it's almost certainly in your default repositories.
Since I've been pretty fastidious about keeping this series in the terminal, launch Emacs with the **-nw** flag to keep in within your terminal emulator.
```
$ emacs -nw
```
Inside of Emacs, type M-x doctor to launch Eliza. For those of you like me from a Vim background who have no idea what this means, just hit escape, type x and then type doctor. Then, share all of your holiday frustrations.
Eliza goes way back, all the way to the mid-1960s a the MIT Artificial Intelligence Lab. [Wikipedia][2] has a rather fascinating look at her history.
Eliza isn't the only amusement inside of Emacs. Check out the [manual][3] for a whole list of fun toys.
![Linux toy: eliza animated][5]
Do you have a favorite command-line toy that you think I ought to profile? We're running out of time, but I'd still love to hear your suggestions. Let me know in the comments below, and I'll check it out. And let me know what you thought of today's amusement.
Be sure to check out yesterday's toy, [Head to the arcade in your Linux terminal with this Pac-man clone][6], and come back tomorrow for another!
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/12/linux-toy-eliza
作者:[Jason Baker][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jason-baker
[b]: https://github.com/lujun9972
[1]: https://www.emacswiki.org/emacs/EmacsDoctor
[2]: https://en.wikipedia.org/wiki/ELIZA
[3]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Amusements.html
[4]: /file/417326
[5]: https://opensource.com/sites/default/files/uploads/linux-toy-eliza-animated.gif (Linux toy: eliza animated)
[6]: https://opensource.com/article/18/12/linux-toy-myman

View File

@ -0,0 +1,254 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Three Ways To Reset And Change Forgotten Root Password on RHEL 7/CentOS 7 Systems)
[#]: via: (https://www.2daygeek.com/linux-reset-change-forgotten-root-password-in-rhel-7-centos-7/)
[#]: author: (Prakash Subramanian https://www.2daygeek.com/author/prakash/)
Three Ways To Reset And Change Forgotten Root Password on RHEL 7/CentOS 7 Systems
======
If you are forget to remember your root password for RHEL 7 and CentOS 7 systems and want to reset the forgotten root password?
If so, dont worry we are here to help you out on this.
Navigate to the following link if you want to **[reset forgotten root password on RHEL 6/CentOS 6][1]**.
This is generally happens when you use different password in vast environment or if you are not maintaining the proper inventory.
Whatever it is. No issues, we will help you through this article.
It can be done in many ways but we are going to show you the best three methods which we tried many times for our clients.
In Linux servers there are three different users are available. These are, Normal User, System User and Super User.
As everyone knows the Root user is known as super user in Linux and Administrator is in Windows.
We cant perform any major activity without root password so, make sure you should have the right root password when you perform any major tasks.
If you dont know or dont have it, try to reset using one of the below method.
* Reset Forgotten Root Password By Booting into Single User Mode using `rd.break`
* Reset Forgotten Root Password By Booting into Single User Mode using `init=/bin/bash`
* Reset Forgotten Root Password By Booting into Rescue Mode
### Method-1: Reset Forgotten Root Password By Booting into Single User Mode
Just follow the below procedure to reset the forgotten root password in RHEL 7/CentOS 7 systems.
To do so, reboot your system and follow the instructions carefully.
**`Step-1:`** Reboot your system and interrupt at the boot menu by hitting **`e`** key to modify the kernel arguments.
![][3]
**`Step-2:`** In the GRUB options, find `linux16` word and add the `rd.break` word in the end of the file then press `Ctrl+x` or `F10` to boot into single user mode.
![][4]
**`Step-3:`** At this point of time, your root filesystem will be mounted in Read only (RO) mode to /sysroot. Run the below command to confirm this.
```
# mount | grep root
```
![][5]
**`Step-4:`** Based on the above output, i can say that im in single user mode and my root file system is mounted in read only mode.
It wont allow you to make any changes on your system until you mount the root filesystem with Read and write (RW) mode to /sysroot. To do so, use the following command.
```
# mount -o remount,rw /sysroot
```
![][6]
**`Step-5:`** Currently your file systems are mounted as a temporary partition. Now, your command prompt shows **switch_root:/#**.
Run the following command to get into a chroot jail so that /sysroot is used as the root of the file system.
```
# chroot /sysroot
```
![][7]
**`Step-6:`** Now you can able to reset the root password with help of `passwd` command.
```
# echo "CentOS7$#123" | passwd --stdin root
```
![][8]
**`Step-7:`** By default CentOS 7/RHEL 7 use SELinux in enforcing mode, so create a following hidden file which will automatically perform a relabel of all files on next boot.
It allow us to fix the context of the **/etc/shadow** file.
```
# touch /.autorelabel
```
![][9]
**`Step-8:`** Issue `exit` twice to exit from the chroot jail environment and reboot the system.
![][10]
**`Step-9:`** Now you can login to your system with your new password.
![][11]
### Method-2: Reset Forgotten Root Password By Booting into Single User Mode
Alternatively we can use the below procedure to reset the forgotten root password in RHEL 7/CentOS 7 systems.
**`Step-1:`** Reboot your system and interrupt at the boot menu by hitting **`e`** key to modify the kernel arguments.
![][3]
**`Step-2:`** In the GRUB options, find `rhgb quiet` word and replace with the `init=/bin/bash` or `init=/bin/sh` word then press `Ctrl+x` or `F10` to boot into single user mode.
Screenshot for **`init=/bin/bash`**.
![][12]
Screenshot for **`init=/bin/sh`**.
![][13]
**`Step-3:`** At this point of time, your root system will be mounted in Read only mode to /. Run the below command to confirm this.
```
# mount | grep root
```
![][14]
**`Step-4:`** Based on the above ouput, i can say that im in single user mode and my root file system is mounted in read only (RO) mode.
It wont allow you to make any changes on your system until you mount the root file system with Read and write (RW) mode. To do so, use the following command.
```
# mount -o remount,rw /
```
![][15]
**`Step-5:`** Now you can able to reset the root password with help of `passwd` command.
```
# echo "RHEL7$#123" | passwd --stdin root
```
![][16]
**`Step-6:`** By default CentOS 7/RHEL 7 use SELinux in enforcing mode, so create a following hidden file which will automatically perform a relabel of all files on next boot.
It allow us to fix the context of the **/etc/shadow** file.
```
# touch /.autorelabel
```
![][17]
**`Step-7:`** Finally `Reboot` the system.
```
# exec /sbin/init 6
```
![][18]
**`Step-9:`** Now you can login to your system with your new password.
![][11]
### Method-3: Reset Forgotten Root Password By Booting into Rescue Mode
Alternatively, we can reset the forgotten Root password for RHEL 7 and CentOS 7 systems using Rescue mode.
**`Step-1:`** Insert the bootable media through USB or DVD drive which is compatible for you and reboot your system. It will take to you to the below screen.
Hit `Troubleshooting` to launch the `Rescue` mode.
![][19]
**`Step-2:`** Choose `Rescue a CentOS system` and hit `Enter` button.
![][20]
**`Step-3:`** Here choose `1` and the rescue environment will now attempt to find your Linux installation and mount it under the directory `/mnt/sysimage`.
![][21]
**`Step-4:`** Simple hit `Enter` to get a shell.
![][22]
**`Step-5:`** Run the following command to get into a chroot jail so that /mnt/sysimage is used as the root of the file system.
```
# chroot /mnt/sysimage
```
![][23]
**`Step-6:`** Now you can able to reset the root password with help of **passwd** command.
```
# echo "RHEL7$#123" | passwd --stdin root
```
![][24]
**`Step-7:`** By default CentOS 7/RHEL 7 use SELinux in enforcing mode, so create a following hidden file which will automatically perform a relabel of all files on next boot.
It allow us to fix the context of the /etc/shadow file.
```
# touch /.autorelabel
```
![][25]
**`Step-8:`** Remove the bootable media then initiate the reboot.
**`Step-9:`** Issue `exit` twice to exit from the chroot jail environment and reboot the system.
![][26]
**`Step-10:`** Now you can login to your system with your new password.
![][11]
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/linux-reset-change-forgotten-root-password-in-rhel-7-centos-7/
作者:[Prakash Subramanian][a]
选题:[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.2daygeek.com/author/prakash/
[b]: https://github.com/lujun9972
[1]: https://www.2daygeek.com/linux-reset-change-forgotten-root-password-in-rhel-6-centos-6/
[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-2.png
[4]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-3.png
[5]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-5.png
[6]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-6.png
[7]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-8.png
[8]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-10.png
[9]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-10a.png
[10]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-11.png
[11]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-12.png
[12]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1.png
[13]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1a.png
[14]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-3.png
[15]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-4.png
[16]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-5.png
[17]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-6.png
[18]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-7.png
[19]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-1.png
[20]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-2.png
[21]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-3.png
[22]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-4.png
[23]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-5.png
[24]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-6.png
[25]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-7.png
[26]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-8.png

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (leommxj)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -119,7 +119,7 @@ via: https://www.networkworld.com/article/3331199/linux/what-does-aslr-do-for-li
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[leommxj](https://github.com/leommxj)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,117 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (lujun9972)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Configure Anaconda on Emacs iD)
[#]: via: (https://idevji.com/configure-anaconda-on-emacs/)
[#]: author: (Devji Chhanga https://idevji.com/author/admin/)
Configure Anaconda on Emacs iD
======
Perhaps my quest for an ultimate IDE ends with [Emacs.][1] My goal was to use Emacs as full-flagged Python IDE. This post describes how to setup Anaconda on Emacs.
My Setup:
```
OS: Trisquel 8.0
Emacs: GNU Emacs 25.3.2
```
Quick Key Guide [(See full guide)][2] :
```
C-x = Ctrl + x
M-x = Alt + x
RET = ENTER
```
### 1. Downloading and installing Anaconda
**1.1 Download:**
Download Anaconda [from here.][3] You should download Python 3.x version as Python 2 will run out of support in 2020. You dont need Python 3.x on your machine. It will be installed by this install script.
**1.2 Install:**
```
cd ~/Downloads
bash Anaconda3-2018.12-Linux-x86.sh
```
### 2. Adding Anaconda to Emacs
**2.1 Adding MELPA to Emacs**
Emacs package named _anaconda-mode_ can be used. This package is on the MELPA repository. Emacs25 requires this repository to be added explicitly.
[Important : Follow this post on how to add MELPA to Emacs.][4]
**2.2 Installing anaconda-mode package on Emacs**
```
M-x package-install RET
anaconda-mode RET
```
**2.3 Configure anaconda-mode in Emacs**
```
echo "(add-hook 'python-mode-hook 'anaconda-mode)" > ~/.emacs.d/init.el
```
### 3\. Running your first script on Anaconda from Emacs
**3.1 Create new .py file**
```
C-x C-f
HelloWorld.py RET
```
**3.2 Add the code**
```
print ("Hello World from Emacs")
```
**3.3 Running it**
```
C-c C-p
C-c C-c
```
Output
```
Python 3.7.1 (default, Dec 14 2018, 19:46:24)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> Hello World from Emacs
>>>
```
_I was encouraged for Emacs usage by[Codingquark;][5]
Errors and omissions should be reported in comments. Cheers!_
--------------------------------------------------------------------------------
via: https://idevji.com/configure-anaconda-on-emacs/
作者:[Devji Chhanga][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://idevji.com/author/admin/
[b]: https://github.com/lujun9972
[1]: https://www.gnu.org/software/emacs/
[2]: https://www.math.uh.edu/~bgb/emacs_keys.html
[3]: https://www.anaconda.com/download/#linux
[4]: https://melpa.org/#/getting-started
[5]: https://codingquark.com

View File

@ -0,0 +1,229 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Top 10 Best Linux Media Server Software)
[#]: via: (https://itsfoss.com/best-linux-media-server)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Top 10 Best Linux Media Server Software
======
Did someone tell you that Linux is just for programmers? That is so wrong! You have got a lot of great tools for [digital artists][1], [writers][2] and musicians.
We have covered such tools in the past. Today its going to be slightly different. Instead of creating new digital content, lets talk about consuming it.
You have probably heard of media servers? Basically these software (and sometimes gadgets) allow you to view your local or cloud media (music, videos etc) in an intuitive interface. You can even use it to stream the content to other devices on your network. Sort of your personal Netflix.
In this article, we will talk about the best media software available for Linux that you can use as a media player or as a media server software as per your requirements.
Some of these applications can also be used with Googles Chromecast and Amazons Firestick.
### Best Media Server Software for Linux
![Best Media Server Software for Linux][3]
The mentioned Linux media server software are in no particular order of ranking.
I have tried to provide installation instructions for Ubuntu and Debian based distributions. Its not possible to list installation steps for all Linux distributions for all the media servers mentioned here. Please take no offence for that.
A couple of software in this list are not open source. If thats the case, I have highlighted it appropriately.
### 1\. Kodi
![Kodi Media Server][4]
Kod is one of the most popular media server software and player. Recently, Kodi 18.0 dropped in with a bunch of improvements that includes the support for Digital Rights Management (DRM) decryption, game emulators, ROMs, voice control, and more.
It is a completely free and open source software. An active community for discussions and support exists as well. The user interface for Kodi is beautiful. I havent had the chance to use it in its early days but I was amazed to see such a good UI for a Linux application.
It has got great playback support so you can add any supported 3rd party media service for the content or manually add the ripped video files to watch.
#### How to install Kodi
Type in the following commands in the terminal to install the latest version of Kodi via its [official PPA][5].
```
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi
```
To know more about installing a development build or upgrading Kodi, refer to the [official installation guide][6].
### 2\. Plex
![Plex Media Server][7]
Plex is yet another impressive media player or could be used as a media server software. It is a great alternative to Kodi for the users who mostly utilize it to create an offline network of their media collection to sync and watch across multiple devices.
Unlike Kodi, **Plex is not entirely open source**. It does offer a free account in order to use it. In addition, it offers premium pricing plans to unlock more features and have a greater control over your media while also being able to get a detailed insight on who/what/how Plex is being used.
If you are an audiophile, you would love the integration of Plex with [TIDAL][8] music streaming service. You can also set up Live TV by adding it to your tuner.
#### How to install Plex
You can simply download the .deb file available on their official webpage and install it directly (or using [GDebi][9])
### 3\. Jellyfin
![Emby media server][10]
Yet another open source media server software with a bunch of features. [Jellyfin][11] is actually a fork of Emby media server. It may be one of the best out there available for free but the multi-platform support still isnt there yet.
You can run it on a browser or utilize Chromecast however you will have to wait if you want the Android app or if you want it to support several devices.
#### How to install Jellyfin
Jellyfin provides a [detailed documentation][12] on how to install it from the binary packages/image available for Linux, Docker, and more.
You will also find it easy to install it from the repository via the command line for Debian-based distribution. Check out their [installation guide][13] for more information.
### 4\. LibreELEC
![libreELEC][14]
LibreELEC is an interesting media server software which is based on Kodi v18.0. They have recently released a new version (9.0.0) with a complete overhaul of the core OS support, hardware compatibility and user experience.
Of course, being based on Kodi, it also has the DRM support. In addition, you can utilize its generic Linux builds or the special ones tailored for Raspberry Pi builds, WeTek devices, and more.
#### How to install LibreELEC
You can download the installer from their [official site][15]. For detailed instructions on how to use it, please refer to the [installation guide][16].
### 5\. OpenFLIXR Media Server
![OpenFLIXR Media Server][17]
Want something similar that compliments Plex media server but also compatible with VirtualBox or VMWare? You got it!
OpenFLIXR is an automated media server software which integrates with Plex to provide all the features along with the ability to auto download TV shows and movies from Torrents. It even fetches the subtitles automatically giving you a seamless experience when coupled with Plex media software.
You can also automate your home theater with this installed. In case you do not want to run it on a physical instance, it supports VMware, VirtualBox and Hyper-V as well. The best part is it is an open source solution and based on Ubuntu Server.
#### How to install OpenFLIXR
The best way to do it is by installing VirtualBox it will be easier. After you do that, just download it from the [official website][18] and import it.
### 6\. MediaPortal
![MediaPortal][19]
MediaPortal is just another open source simple media server software with a decent user interface. It all depends on your personal preference event though I would recommend Kodi over this.
You can play DVDs, stream videos on your local network, and listen to music as well. It does not offer a fancy set of features but the ones you will mostly need.
It gives you the option to choose from two different versions (one that is stable and the second which tries to incorporate new features could be unstable).
#### How to install MediaPotal
Depending on what you want to setup (A TV-server only or a complete server setup), follow the [official setup guide][20] to install it properly.
### 7\. Gerbera
![Gerbera Media Center][21]
A simple implementation for a media server to be able to stream using your local network. It does support transcoding which will convert the media in the format your device supports.
If you have been following the options for media server form a very long time, then you might identify this as the rebranded (and improved) version of MediaTomb. Even though it is not a popular choice among the Linux users it is still something usable when all fails or for someone who prefers a straightforward and a basic media server.
#### How to install Gerbera
Type in the following commands in the terminal to install it on any Ubuntu-based distro:
```
sudo apt install gerbera
```
For other Linux distributions, refer to the [documentation][22].
### 8\. OSMC (Open Source Media Center)
![OSMC Open Source Media Center][23]
It is an elegant-looking media server software originally based on Kodi media center. I was quite impressed with the user interface. It is simple and robust, being a free and open source solution. In a nutshell, all the essential features you would expect in a media server software.
You can also opt in to purchase OSMCs flagship device. It will play just about anything up to 4K standards with HD audio. In addition, it supports Raspberry Pi builds and 1st-gen Apple TV.
#### How to install OSMC
If your device is compatible, you can just select your operating system and download the device installer from the official [download page][24] and create a bootable image to install.
### 9\. Universal Media Server
![][25]
Yet another simple addition to this list. Universal Media Server does not offer any fancy features but just helps you transcode / stream video and audio without needing much configuration.
It supports Xbox 360, PS 3, and just about any other [DLNA][26]-capable devices.
#### How to install Universal Media Center
You can find all the packages listed on [FossHub][27] but you should follow the [official forum][28] to know more about how to install the package that you downloaded from the website.
### 10\. Red5 Media Server
![Red5 Media Server][29]Image Credit: [Red5 Server][30]
A free and open source media server tailored for enterprise usage. You can use it for live streaming solutions no matter if it is for entertainment or just video conferencing.
They also offer paid licensing options for mobiles and high scalability.
#### How to install Red5
Even though it is not the quickest installation method, follow the [installation guide on GitHub][31] to get started with the server without needing to tinker around.
### Wrapping Up
Every media server software listed here has its own advantages you should pick one up and try the one which suits your requirement.
Did we miss any of your favorite media server software? Let us know about it in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/best-linux-media-server
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/best-linux-graphic-design-software/
[2]: https://itsfoss.com/open-source-tools-writers/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/best-media-server-linux.png?resize=800%2C450&ssl=1
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/kodi-18-media-server.jpg?fit=800%2C450&ssl=1
[5]: https://itsfoss.com/ppa-guide/
[6]: https://kodi.wiki/view/HOW-TO:Install_Kodi_for_Linux
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/plex.jpg?fit=800%2C368&ssl=1
[8]: https://tidal.com/
[9]: https://itsfoss.com/gdebi-default-ubuntu-software-center/
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/emby-server.jpg?fit=800%2C373&ssl=1
[11]: https://jellyfin.github.io/
[12]: https://jellyfin.readthedocs.io/en/latest/
[13]: https://jellyfin.readthedocs.io/en/latest/administrator-docs/installing/
[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/libreelec.jpg?resize=800%2C600&ssl=1
[15]: https://libreelec.tv/downloads_new/
[16]: https://libreelec.wiki/libreelec_usb-sd_creator
[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/openflixr-media-server.jpg?fit=800%2C449&ssl=1
[18]: http://www.openflixr.com/#Download
[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/mediaportal.jpg?ssl=1
[20]: https://www.team-mediaportal.com/wiki/display/MediaPortal1/Quick+Setup
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/gerbera-server-softwarei.jpg?fit=800%2C583&ssl=1
[22]: http://docs.gerbera.io/en/latest/install.html
[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/osmc-server.jpg?fit=800%2C450&ssl=1
[24]: https://osmc.tv/download/
[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/universal-media-server.jpg?ssl=1
[26]: https://en.wikipedia.org/wiki/Digital_Living_Network_Alliance
[27]: https://www.fosshub.com/Universal-Media-Server.html?dwl=UMS-7.8.0.tgz
[28]: https://www.universalmediaserver.com/forum/viewtopic.php?t=10275
[29]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/red5.jpg?resize=800%2C364&ssl=1
[30]: https://www.red5server.com/
[31]: https://github.com/Red5/red5-server/wiki/Installation-on-Linux
[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/best-media-server-linux.png?fit=800%2C450&ssl=1

View File

@ -1,99 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Two graphical tools for manipulating PDFs on the Linux desktop)
[#]: via: (https://opensource.com/article/19/2/manipulating-pdfs-linux)
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
Two graphical tools for manipulating PDFs on the Linux desktop
======
PDF-Shuffler and PDF Chain are great tools for modifying PDFs in Linux.
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4)
With the way I talk and write about PDFs and tools for working with them, some people think I'm in love with the format. I'm not, for a variety of reasons I won't go into here.
I won't go so far as saying PDFs are a necessary evil in my personal and professional life—rather they're a necessary not-so-good. Often I have to use PDFs, even though there are better alternatives for delivering documents.
When I work with PDFs, usually at the day job and with one of those other operating systems, I fiddle with them using Adobe Acrobat. But what about when I have to work with PDFs on the Linux desktop? Let's take a look at two of the graphical tools I use to manipulate PDFs.
### PDF-Shuffler
As its name suggests, you can use [PDF-Shuffler][1] to move pages around in a PDF file. It can do a little more, but the software's capabilities are limited. That doesn't mean PDF-Shuffler isn't useful. It is. Very useful.
You can use PDF-Shuffler to:
* Extract pages from PDF files
* Add pages to a file
* Rearrange the pages in a file
Be aware that PDF-Shuffler has a few dependencies, like pyPDF and python-gtk. Usually, installing it via a package manager is the fastest and least frustrating route.
Let's say you want to extract pages from a PDF, maybe to act as a sample chapter from your book. Open the PDF file by selecting **File > Add**.
![](https://opensource.com/sites/default/files/uploads/pdfshuffler-book.png)
To extract pages 7 to 9, press Ctrl and click-select the pages. Then, right-click and select **Export selection**.
![](https://opensource.com/sites/default/files/uploads/pdfshuffler-export.png)
Choose the directory where you want to save the file, give it a name, and click **Save**.
To add a file—for example, to add a cover or re-insert scanned, signed pages of a contract or application—open a PDF file, then select **File > Add** and find the PDF file that you want to add. Click **Open**.
PDF-Shuffler has an annoying habit of adding pages at the end of the PDF file you're working on. Click and drag the page you added to where you want it to go in the file. You can only click and drag one page in a file at a time.
![](https://opensource.com/sites/default/files/uploads/pdfshuffler-move.png)
### PDF Chain
I'm a big fan of [PDFtk][2], a command-line app for doing some interesting things with and to PDFs. Since I don't use it frequently, I don't remember all of PDFtk's commands and options.
[PDF Chain][3] is a very good alternative to PDFtk's command line. It gives you one-click access to PDFtk's most frequently used commands. Without touching a menu, you can:
* Merge PDFs (including rotating the pages of one or more files)
* Extract pages from a PDF and save them to individual files
* Add a background or watermark to a PDF
* Add attachments to a file
![](https://opensource.com/sites/default/files/uploads/pdfchain1.png)
You can also do more. Click on the **Tools** menu to:
* Extract attachments from a PDF
* Compress or uncompress a file
* Extract the metadata from the file
* Fill in PDF forms from an external [data file][4]
* [Flatten][5] a PDF
* Drop [XML Forms Architecture][6] (XFA) data from PDF forms
To be honest, I only use the commands to extract attachments and compress or uncompress PDFs with PDF Chain or PDFtk. The rest are pretty much terra incognita for me.
### Summing up
The number of tools available on Linux for working with PDFs never ceases to amaze me. And neither does the breadth and depth of their features and functions. I can usually find one, whether command line or graphical, that does what I need to do. For the most part, PDF Mod and PDF Chain work well for me.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/2/manipulating-pdfs-linux
作者:[Scott Nesbitt][a]
选题:[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/scottnesbitt
[b]: https://github.com/lujun9972
[1]: https://savannah.nongnu.org/projects/pdfshuffler/
[2]: https://en.wikipedia.org/wiki/PDFtk
[3]: http://pdfchain.sourceforge.net/
[4]: http://www.verypdf.com/pdfform/fdf.htm
[5]: http://pdf-tips-tricks.blogspot.com/2009/03/flattening-pdf-layers.html
[6]: http://en.wikipedia.org/wiki/XFA

View File

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

View File

@ -0,0 +1,176 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Emoji-Log: A new way to write Git commit messages)
[#]: via: (https://opensource.com/article/19/2/emoji-log-git-commit-messages)
[#]: author: (Ahmad Awais https://opensource.com/users/mrahmadawais)
Emoji-Log: A new way to write Git commit messages
======
Add context to your commits with Emoji-Log.
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/emoji_tech_keyboard.jpg?itok=ncBNKZFl)
I'm a full-time open source developer—or, as I like to call it, an 🎩 open sourcerer. I've been working with open source software for over a decade and [built hundreds][1] of open source software applications.
I also am a big fan of the Don't Repeat Yourself (DRY) philosophy and believe writing better Git commit messages—ones that are contextual enough to serve as a changelog for your open source software—is an important component of DRY. One of the many workflows I've written is [Emoji-Log][2], a straightforward, open source Git commit log standard. It improves the developer experience (DX) by using emoji to create better Git commit messages.
I've used Emoji-Log while building the [VSCode Tips & Tricks repo][3], my 🦄 [Shades of Purple VSCode theme repo][4], and even an [automatic changelog][5] that looks beautiful.
### Emoji-Log's philosophy
I like emoji (which is, in fact, the plural of emoji). I like 'em a lot. Programming, code, geeks/nerds, open source… all of that is inherently dull and sometimes boring. Emoji help me add colors and emotions to the mix. There's nothing wrong with wanting to attach feelings to the 2D, flat, text-based world of code.
Instead of memorizing [hundreds of emoji][6], I've learned it's better to keep the categories small and general. Here's the philosophy that guides writing commit messages with Emoji-Log:
1. **Imperative**
* Make your Git commit messages imperative.
* Write commit message like you're giving an order.
* e.g., Use ✅ **Add** instead of ❌ **Added**
* e.g., Use ✅ **Create** instead of ❌ **Creating**
2. **Rules**
* A small number of categories are easy to memorize.
* Nothing more, nothing less
* e.g. **📦 NEW** , **👌 IMPROVE** , **🐛 FIX** , **📖 DOC** , **🚀 RELEASE** , and **✅ TEST**
3. **Actions**
* Make Git commits based on actions you take.
* Use a good editor like [VSCode][7] to commit the right files with commit messages.
### Writing commit messages
Use only the following Git commit messages. The simple and small footprint is the key to Emoji-Logo.
1. **📦 NEW: IMPERATIVE_MESSAGE**
* Use when you add something entirely new.
* e.g., **📦 NEW: Add Git ignore file**
2. **👌 IMPROVE: IMPERATIVE_MESSAGE**
* Use when you improve/enhance piece of code like refactoring etc.
* e.g., **👌 IMPROVE: Remote IP API Function**
3. **🐛 FIX: IMPERATIVE_MESSAGE**
* Use when you fix a bug. Need I say more?
* e.g., **🐛 FIX: Case converter**
4. **📖 DOC: IMPERATIVE_MESSAGE**
* Use when you add documentation, like README.md or even inline docs.
* e.g., **📖 DOC: API Interface Tutorial**
5. **🚀 RELEASE: IMPERATIVE_MESSAGE**
* Use when you release a new version. e.g., **🚀 RELEASE: Version 2.0.0**
6. **✅ TEST: IMPERATIVE_MESSAGE**
* Use when you release a new version.
* e.g., **✅ TEST: Mock User Login/Logout**
That's it for now. Nothing more, nothing less.
### Emoji-Log functions
For quick prototyping, I have made the following functions that you can add to your **.bashrc** / **.zshrc** files to use Emoji-Log quickly.
```
#.# Better Git Logs.
### Using EMOJI-LOG (https://github.com/ahmadawais/Emoji-Log).
# Git Commit, Add all and Push — in one step.
function gcap() {
    git add . && git commit -m "$*" && git push
}
# NEW.
function gnew() {
    gcap "📦 NEW: $@"
}
# IMPROVE.
function gimp() {
    gcap "👌 IMPROVE: $@"
}
# FIX.
function gfix() {
    gcap "🐛 FIX: $@"
}
# RELEASE.
function grlz() {
    gcap "🚀 RELEASE: $@"
}
# DOC.
function gdoc() {
    gcap "📖 DOC: $@"
}
# TEST.
function gtst() {
    gcap "✅ TEST: $@"
}
```
To install these functions for the [fish shell][8], run the following commands:
```
function gcap; git add .; and git commit -m "$argv"; and git push; end;
function gnew; gcap "📦 NEW: $argv"; end
function gimp; gcap "👌 IMPROVE: $argv"; end;
function gfix; gcap "🐛 FIX: $argv"; end;
function grlz; gcap "🚀 RELEASE: $argv"; end;
function gdoc; gcap "📖 DOC: $argv"; end;
function gtst; gcap "✅ TEST: $argv"; end;
funcsave gcap
funcsave gnew
funcsave gimp
funcsave gfix
funcsave grlz
funcsave gdoc
funcsave gtst
```
If you prefer, you can paste these aliases directly in your **~/.gitconfig** file:
```
# Git Commit, Add all and Push — in one step.
cap = "!f() { git add .; git commit -m \"$@\"; git push; }; f"
# NEW.
new = "!f() { git cap \"📦 NEW: $@\"; }; f"
# IMPROVE.
imp = "!f() { git cap \"👌 IMPROVE: $@\"; }; f"
# FIX.
fix = "!f() { git cap \"🐛 FIX: $@\"; }; f"
# RELEASE.
rlz = "!f() { git cap \"🚀 RELEASE: $@\"; }; f"
# DOC.
doc = "!f() { git cap \"📖 DOC: $@\"; }; f"
# TEST.
tst = "!f() { git cap \"✅ TEST: $@\"; }; f"
```
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/2/emoji-log-git-commit-messages
作者:[Ahmad Awais][a]
选题:[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/mrahmadawais
[b]: https://github.com/lujun9972
[1]: https://github.com/ahmadawais
[2]: https://github.com/ahmadawais/Emoji-Log/
[3]: https://github.com/ahmadawais/VSCode-Tips-Tricks
[4]: https://github.com/ahmadawais/shades-of-purple-vscode/commits/master
[5]: https://github.com/ahmadawais/shades-of-purple-vscode/blob/master/CHANGELOG.md
[6]: https://gitmoji.carloscuesta.me/
[7]: https://VSCode.pro
[8]: https://en.wikipedia.org/wiki/Friendly_interactive_shell

View File

@ -0,0 +1,194 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How To Restore Sudo Privileges To A User)
[#]: via: (https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/)
[#]: author: (SK https://www.ostechnix.com/author/sk/)
How To Restore Sudo Privileges To A User
======
![](https://www.ostechnix.com/wp-content/uploads/2019/02/restore-sudo-privileges-720x340.png)
The other day I was testing how to [**add a regular user to sudo group and remove the given privileges**][1] to make him as a normal user again on Ubuntu. While testing, I removed my administrative user from the **sudo group**. As you already know, a user should be in sudo group to do any administrative tasks. But, I had only one super user and I already took out his sudo privileges. Whenever I run a command with sudo prefix, I encountered an error **sk is not in the sudoers file. This incident will be reported** “. I cant do any administrative tasks. I couldnt switch to root user using sudo su command. As you know already, root user is disabled by default in Ubuntu, so I cant log in as root user either. Have you ever been in a situation like this? No worries! This brief tutorial explains how to restore sudo privileges to a user on Linux. I tested this on Ubuntu 18.04 system, but it might work on other Linux distributions as well.
### Restore Sudo Privileges
Boot your Linux system into recovery mode.
To do so, restart your system and press and hold the **SHIFT** key while booting. You will see the grub boot menu. Choose **“Advanced options for Ubuntu”** from the boot menu list.
![][3]
In the next screen, choose **“recovery mode”** option and hit ENTER:
![][4]
Next, choose **“Drop to root shell prompt”** option and hit ENTER key:
![][5]
Youre now in recovery mode as root user.
![][6]
Type the following command to mount root (/) file system in read/write mode.
```
mount -o remount,rw /
```
Now, add the user that you removed from the sudo group.
In my case, I am adding the user called sk to the sudo group using the following command:
```
adduser sk sudo
```
![][7]
Then, type **exit** to return back to the recovery menu. Select **Resume** to start your Ubuntu system.
![][8]
Press ENTER to continue to log-in normal mode:
![][9]
Now check if the sudo privileges have been restored.
To do so, type the following command from the Terminal.
```
$ sudo -l -U sk
```
Sample output:
```
[sudo] password for sk:
Matching Defaults entries for sk on ubuntuserver:
env_reset, mail_badpass,
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User sk may run the following commands on ubuntuserver:
(ALL : ALL) ALL
```
As you see in the above message, the user sk can run all commands with sudo prefix. Congratulations! You have successfully restored the sudo privileges to the user.
#### There are also other possibilities for causing broken sudo
Please note that I actually did it on purpose. I removed myself from the sudo group and fixed the broken sudo privileges as described above. Dont do this if you have only one sudo user. And, this method will work only on systems that you have physical access. If it is remote server or vps, it is very difficult to fix it. You might require your hosting providers help.
Also, there are two other possibilities for causing broken sudo.
* The /etc/sudoers file might have been altered.
* You or someone might have changed the permission of /etc/sudoers file.
If you have done any one or all of the above mentioned things and ended up with broken sudo, try the following solutions.
**Solution 1:**
If you have altered the contents of /etc/sudoers file, go to the recovery mode as described earlier.
Backup the existing /etc/sudoers file before making any changes.
```
cp /etc/sudoers /etc/sudoers.bak
```
Then, open /etc/sudoers file:
```
visudo
```
Make the changes in the file to look like this:
```
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
```
Once you modified the contents to reflect like this, press **CTRL+X** and **y** save and close the file.
Finally, type exit and select **Resume** to start your Ubuntu system to exit from the recovery mode and continue booting as normal user.
Now, try to use run any command with sudo prefix to verify if the sudo privileges are restored.
**Solution 2:**
If you changed the permission of the /etc/sudoers file, this method will fix the broken sudo issue.
From the recovery mode, run the following command to set the correct permission to /etc/sudoers file:
```
chmod 0440 /etc/sudoers
```
Once you set the proper permission to the file, type exit and select **Resume** to start your Ubuntu system in normal mode. Finally, verify if you can able to run any sudo command.
**Suggested read:**
And, thats all for now. Hope this was useful . More good stuffs to come. Stay tuned!
Cheers!
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/how-to-restore-sudo-privileges-to-a-user/
作者:[SK][a]
选题:[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.ostechnix.com/author/sk/
[b]: https://github.com/lujun9972
[1]: https://www.ostechnix.com/how-to-grant-and-remove-sudo-privileges-to-users-on-ubuntu/
[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-1.png
[4]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-2.png
[5]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-3.png
[6]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-4.png
[7]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-5-1.png
[8]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-6.png
[9]: http://www.ostechnix.com/wp-content/uploads/2019/02/fix-broken-sudo-7.png

View File

@ -1,78 +0,0 @@
[#]collector(lujun9972)
[#]translator(lujun9972)
[#]reviewer( )
[#]publisher( )
[#]url( )
[#]subject(Get started with Org mode without Emacs)
[#]via(https://opensource.com/article/19/1/productivity-tool-org-mode)
[#]author(Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney))
在没有 Emacs 的情况下开始使用 Org mode
======
不,你不需要 Emacs 也能用 Org这是我开源工具系列的第 16 集,将会让你在 2019 年变得更加有生产率。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/web_browser_desktop_devlopment_design_system_computer.jpgitok=pfqRrJgh)
每到年初似乎总有这么一个疯狂的冲动来寻找提高生产率的方法。新年决心,正确地开始一年的冲动,以及"向前看"的态度都是这种冲动的表现。软件推荐通常都会选择闭源和专利软件。但这不是必须的。
这是我 2019 年改进生产率的 19 个新工具中的第 16 个。
### Org (非 Emacs)
[Org mode][1] (或者就是 Org) 并不是新鲜货,但依然有许多人没有用过。他们很乐意试用一下以体验 Org 是如何改善生产率的。但最大的障碍来自于 Org 是与 Emacs 相沟联的而且很多人都认为两者缺一不可。并不是这样的一旦你理解了其基础Org 就可以与各种其他工具和编辑器一起使用。
![](https://opensource.com/sites/default/files/uploads/org-1.png)
Org本质上是一个结构化的文本文件。它有标题子标题以及各种关键字其他工具可以根据这些关键字将文件解析成日程表和代办列表。Org 文件可以被任何纯文本编辑器编辑(例如。,[Vim][2][Atom][3],或 [Visual Studio Code][4]),而且很多编辑器都有插件可以帮你创建和管理 Org 文件。
一个基础的 Org 文件看起来是这样的:
```
* Task List
** TODO Write Article for Day 16 - Org w/out emacs
   DEADLINE: <2019-01-25 12:00>
*** DONE Write sample org snippet for article
    - Include at least one TODO and one DONE item
    - Show notes
    - Show SCHEDULED and DEADLINE
*** TODO Take Screenshots
** Dentist Appointment
   SCHEDULED: <2019-01-31 13:30-14:30>
```
Org 是一种大纲格式,它使用 ***** 作为标识指明事项的级别。任何以 TODO( 是的,全大些) 开头的事项都代办事项。标注为 DONE 的工作表示该工作已经完成。SCHEDULED 和 DEADLINE 标识与该事务相关的日期和时间。如何任何地方都没有时间,则该事务被视为全天活动。
使用正确的插件,你喜欢的文本编辑器可以成为一个充满生产率和组织能力的强大工具。例如,[vim-orgmode][5] 插件拥有函数来创建 Org 文件,语法高亮,以及各种用来生成跨文件的日程和综合代办事项列表的关键命令。
![](https://opensource.com/sites/default/files/uploads/org-2.png)
Atom 的 [Organized][6] 插件在屏幕右边添加一个侧边栏,用来现实 Org 文件中的日程和代办事项。默认情况下它从配置项中设置的路径中读取多个 Org 文件。Todo 侧边栏允许你通过点击未完事项来将其标记为已完成,它会自动更新源 Org 文件。
![](https://opensource.com/sites/default/files/uploads/org-3.png)
还有一大堆 Org 工具可以帮助你保持生产率。使用 PythonPerlPHPNodeJS 等库,你可以开发自己的脚本和工具。当然,少不了 [Emacs][7],它的核心功能就包括支持 Org。
![](https://opensource.com/sites/default/files/uploads/org-4.png)
Org mode 是跟踪需要完成的工作和时间的最好工具之一。而且,与传闻相反,它无需 Emacs任何一个文本编辑器都行。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/productivity-tool-org-mode
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney (Kevin Sonney)
[b]: https://github.com/lujun9972
[1]: https://orgmode.org/
[2]: https://www.vim.org/
[3]: https://atom.io/
[4]: https://code.visualstudio.com/
[5]: https://github.com/jceb/vim-orgmode
[6]: https://atom.io/packages/organized
[7]: https://www.gnu.org/software/emacs/

View File

@ -0,0 +1,76 @@
3款用于学术发表的开源工具
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_science.png?itok=WDKARWGV)
有一个行业在采用数字或者开源工具方面已落后其它行业,那就是竞争与利润并存的学术出版业。根据 Stephen Buranyi 去年在 [The Guardian][1] 发表的一份图表这个估值超过190亿英镑260亿美元的行业至今在其选择、发表甚至分享最重要的科学研究的系统方面仍受限于印刷媒介的诸多限制。全新的数字时代科技展现了一个能够加速探索、推动科学合作性而不是竞争性以及将投入重新从基础建设导向有益社会的研究的巨大的机遇。
非盈利性的 [eLife 倡议][2] 是由研究的资金赞助方建立旨在通过使用数字或者开源技术来走出上述僵局。除了为生活中科学和生物医疗方面的重大成就出版开放式获取的杂志eLife 已将自己变成了一个在研究交流方面的创新实验窗口——而大部分的实验都是基于开源精神的。
参与开源出版项目给予我们加速接触、采用科学技术,提升用户体验的机会。我们认为这种机会对于推动学术出版行业是重要的。大而化之地说,开源产品的用户体验经常是有待开发的,而有时候这种情况会阻止其他人去使用它。作为我们在 OSS 开发中投入的一部分,为了鼓励更多用户使用这些产品,我们十分注重用户体验。
我们所有的代码都是开源的并且我们也积极鼓励开源社区参与进我们的项目中。这对我们来说意味着更快的迭代、更多的实验、更大的透明度,同时也拓宽了我们工作的外延。
我们现在参与的项目,例如 Libero (之前称作 [eLife Continuum][3])和 [可复制文档栈][4] 的开发以及我们最近和 [Hypothesis][5] 的合作,展示了 OSS 是如何在校队、发表以及新发现的沟通方面带来正面影响的。
### Libero
Libero 是面向发布者的服务及应用套餐它包括一个后生产出版系统、整套前端用户界面、Libero 的棱镜阅读器、一个开放式的API以及一个搜索推荐引擎。
去年我们采取了用户导向的途径重新设计了 Libero 的前端,做出了一个使用户较少地分心并更多地集中注意在研究文章上的站点。我们和 eLife 社区成员测试并迭代了站点所有的核心功能以确保给所有人最好的阅读体验。网站的新 API 也给可供机器阅读的内容提供了更简单的访问途径,其中包括文字挖掘、机器学习以及在线应用开发。我们网站上的内容以及引领新设计的样式都是开源的,以鼓励 eLife 和其它想要使用它的发布者后续的开发。
### 可复制文档栈
在与 [Substance][6] 和 [Stencila][7] 的合作下eLife 也参与了一个项目来创建可复制的文档栈RDS——一个开放式的创作、编纂以及在线出版可复制的计算型手稿的工具栈。
今天越来越多的研究员能够通过 [R、Markdown][8] 和 [Python][9] 等语言记录他们的计算型实验。这些可以作为实验记录的重要部分,但是尽管它们可以通过最终的研究文章独立地分享,传统出版流程经常将它们视为次级内容。为了发表论文,使用这些语言的研究员除了将他们的计算结果用图片的形式“扁平化”提交外别无他法。但是这导致了许多实验价值和代码和计算数据可重复利用性的流失。诸如 [Jupyter][10] 的电子笔记本解决方案确实可以使研究员以一种可重复利用、可执行的简单形式发布,但是这种方案仍然独立于整个手稿发布过程之外,而不是集成在其中。
[可复制文档栈][11] 项目着眼于通过开发、发布一个能够把代码和数据集成在文档自身的产品雏形来突出这些挑战并阐述一个端对端的从创作到出版的完整科技。它将最终允许用户以一种包含嵌入代码块和计算结果(统计结果、图表或图片)的形式提交他们的手稿并在出版过程中保留这些可视、可执行的部分。那时发布者就可以将这些作为发布的在线文章的整体所保存。
### 用 Hypothesis 进行开放式注解
最近,我们与 [Hypothesis][12] 合作引进了开放式注解,使得我们网站的用户们可以写评语、高亮文章重要部分以及与在线阅读的群体互动。
通过这样的合作,开源的 Hypothesis 软件被定制得更具有现代化的特性如单次登录验证、用户界面定制选项,给予了发布者在他们自己网站上更多的控制。这些提升正引导着关于发表的学术内容高质量的讨论。
这个工具可以无缝集成进发布者的网站,学术发表平台 [PubFactory][13] 和内容解决方案供应商 [Ingenta][14] 已经利用了它优化后的特性集。[HighWire][15] 和 [Silverchair][16] 也为他们的发布者提供了实施这套方案的机会。
### 其它产业和开源软件
过段时间,我们希望看到更多的发布者采用 Hypothesis、Libero 以及其它开源软件去帮助他们促进重要科学研究的发现以及循环利用。但是 eLife 所能利用的因这些软件和其它 OSS 科技带来的创新机会在其他产业也很普遍。
数据科学的世界离不开高质量、强支持的开源软件和围绕它们形成的社区;[TensorFlow][17] 就是这样一个好例子。感谢 OSS 以及其社区AI 的所有领域和机器学习相比于计算机的其它领域有了迅速的提升和发展。与之类似的是 Linux 云端网页主机、Docker 容器、Github上最流行的开源项目之一的 Kubernetes 使用的爆炸性增长。
所有的这些科技使得不同团体能够四两拨千斤并集中在创新而不是造轮子上。最后,那才是 OSS 真正的好处:它使得我们从互相的失败中学习,在互相的成功中成长。
我们总是在寻找与研究和科技界面方面最好的人才和想法交流的机会。你可以在 [eLife Labs][18] 上或者联系 [innovation@elifesciences.org][19] 找到更多这种交流的信息。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/3/scientific-publishing-software
作者:[Paul Shanno][a]
译者:[tomjlw](https://github.com/tomjlw)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/pshannon
[1]:https://www.theguardian.com/science/2017/jun/27/profitable-business-scientific-publishing-bad-for-science
[2]:https://elifesciences.org/about
[3]:https://elifesciences.org/inside-elife/33e4127f/elife-introduces-continuum-a-new-open-source-tool-for-publishing
[4]:https://elifesciences.org/for-the-press/e6038800/elife-supports-development-of-open-technology-stack-for-publishing-reproducible-manuscripts-online
[5]:https://elifesciences.org/for-the-press/81d42f7d/elife-enhances-open-annotation-with-hypothesis-to-promote-scientific-discussion-online
[6]:https://github.com/substance
[7]:https://github.com/stencila/stencila
[8]:https://rmarkdown.rstudio.com/
[9]:https://www.python.org/
[10]:http://jupyter.org/
[11]:https://elifesciences.org/labs/7dbeb390/reproducible-document-stack-supporting-the-next-generation-research-article
[12]:https://github.com/hypothesis
[13]:http://www.pubfactory.com/
[14]:http://www.ingenta.com/
[15]:https://github.com/highwire
[16]:https://www.silverchair.com/community/silverchair-universe/hypothesis/
[17]:https://www.tensorflow.org/
[18]:https://elifesciences.org/labs
[19]:mailto:innovation@elifesciences.org

View File

@ -0,0 +1,62 @@
[#]collector(lujun9972)
[#]translator(lujun9972)
[#]reviewer( )
[#]publisher( )
[#]url( )
[#]subject(Schedule a visit with the Emacs psychiatrist)
[#]via(https://opensource.com/article/18/12/linux-toy-eliza)
[#]author(Jason Baker https://opensource.com/users/jason-baker)
预约 Emacs 心理医生
======
Eliza 是一个隐藏于某个 Linux 最流行文本编辑器中的自然语言处理聊天机器人。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-eliza.pngitok=3ioiBik_)
欢迎你,今天时期 24 天的 Linux 命令行玩具的又一天。如果你是第一次访问本系列,你可能会问什么是命令行玩具呢。我们将会逐步确定这个概念,但一般来说,它可能是一个游戏,或任何能让你在终端玩的开心的其他东西。
可能你们已经见过了很多我们之前挑选的那些玩具,但我们依然希望对所有人来说都至少有一件新鲜事物。
今天的选择是 Emacs 中的一个彩蛋ElizaRogerian 心理医生,一个准备好倾听你述说一切的终端玩具。
旁白:虽然这个玩具很好玩,但你的健康不是用来开玩笑的。请在假期期间照顾好你自己,无论时身体上还是精神上,若假期中的压力和焦虑对你的健康产生负面影响,请考虑找专业人士进行指导。真的有用。
要启动 [Eliza][1],首先,你需要启动 Emacs。很有可能 Emacs 已经安装在你的系统中了,但若没有,它基本上也肯定在你默认的软件仓库中。
由于我要求本系列的工具一定要时运行在终端内,因此使用 **-nw** 标志来启动 Emacs 让它在你的终端模拟器中运行。
```
$ emacs -nw
```
在 Emacs 中,输入 M-x doctor 来启动 Eliza。对于像我这样有 Vim 背景的人可能不知道这是什么意思,只需要按下 escape输入 x 然后输入 doctor。然后向它倾述所有假日的烦恼吧。
Eliza 历史悠久,最早可以追溯到 1960 年代中期的 MIT 人工智能实验室。[维基百科 ][2] 上有它历史的详细说明。
Eliza 并不是 Emacs 中唯一的娱乐工具。查看 [手册 ][3] 可以看到一整列好玩的玩具。
![Linux toyeliza animated][5]
你有什么喜欢的命令行玩具值得推荐吗?我们时间不多了,但我还是想听听你的建议。请在下面评论中告诉我,我会查看的。另外也欢迎告诉我你们对本次玩具的想法。
请一定要看看昨天的玩具,[带着这个复刻版吃豆人来到 Linux 终端游乐中心 ][6],然后明天再来看另一个玩具!
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/12/linux-toy-eliza
作者:[Jason Baker][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jason-baker
[b]: https://github.com/lujun9972
[1]: https://www.emacswiki.org/emacs/EmacsDoctor
[2]: https://en.wikipedia.org/wiki/ELIZA
[3]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Amusements.html
[4]: /file/417326
[5]: https://opensource.com/sites/default/files/uploads/linux-toy-eliza-animated.gif (Linux toy: eliza animated)
[6]: https://opensource.com/article/18/12/linux-toy-myman

View File

@ -0,0 +1,117 @@
[#]collector(lujun9972)
[#]translator(lujun9972)
[#]reviewer( )
[#]publisher( )
[#]url( )
[#]subject(Configure Anaconda on Emacs iD)
[#]via(https://idevji.com/configure-anaconda-on-emacs/)
[#]author(Devji Chhanga https://idevji.com/author/admin/)
在 Emacs 上配置 Anaconda
======
也许我所最求的究极 IDE 就是 [Emacs][1] 了。我的目标是使 Emacs 成为一款全能的 Python IDE。本文描述了如何在 Emacs 上配置 Anaconda。
我的配置信息:
```
OS: Trisquel 8.0
Emacs: GNU Emacs 25.3.2
```
快捷键说明 [(参见完全指南 )][2]
```
C-x = Ctrl + x
M-x = Alt + x
RET = ENTER
```
### 1。下载并安装 Anaconda
#### 1.1 下载:
[从这儿 ][3] 下载 Anaconda。你应该下载 Python 3.x 版本因为 Python 2 在 2020 年就不再支持了。你无需预先安装 Python 3.x。安装脚本会自动进行安装。
#### 1.2 安装:
```
cd ~/Downloads
bash Anaconda3-2018.12-Linux-x86.sh
```
### 2。将 Anaconda 添加到 Emacs
#### 2.1 将 MELPA 添加到 Emacs
我们需要用到 _anaconda-mode_ 这个 Emacs 包。该包位于 MELPA 仓库中。Emacs25 需要手工添加该仓库。
[注意:点击本文查看如何将 MELPA 添加到 Emacs。][4]
#### 2.2 为 Emacs 安装 anaconda-mode 包
```
M-x package-install RET
anaconda-mode RET
```
#### 2.3 为 Emacs 配置 anaconda-mode
```
echo "(add-hook 'python-mode-hook 'anaconda-mode)" > ~/.emacs.d/init.el
```
### 3。在 Emacs 上通过 Anaconda 运行你第一个脚本
#### 3.1 创建新 .py 文件
```
C-x C-f
HelloWorld.py RET
```
#### 3.2 输入下面代码
```
print ("Hello World from Emacs")
```
#### 3.3 运行之
```
C-c C-p
C-c C-c
```
输出为
```
Python 3.7.1 (default, Dec 14 2018, 19:46:24)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> Hello World from Emacs
>>>
```
我是受到 [Codingquark;][5] 的影响才开始使用 Emacs 的。
有任何错误和遗漏请在评论中之处。干杯!
--------------------------------------------------------------------------------
via: https://idevji.com/configure-anaconda-on-emacs/
作者:[Devji Chhanga][a]
选题:[lujun9972][b]
译者:[lujun9972](https://github.com/lujun9972)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://idevji.com/author/admin/
[b]: https://github.com/lujun9972
[1]: https://www.gnu.org/software/emacs/
[2]: https://www.math.uh.edu/~bgb/emacs_keys.html
[3]: https://www.anaconda.com/download/#linux
[4]: https://melpa.org/#/getting-started
[5]: https://codingquark.com

View File

@ -0,0 +1,99 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Two graphical tools for manipulating PDFs on the Linux desktop)
[#]: via: (https://opensource.com/article/19/2/manipulating-pdfs-linux)
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
两款 Linux 桌面中的图形化操作 PDF 的工具
======
PDF-Shuffler 和 PDF Chain 是在 Linux 中修改 PDF 的绝佳工具。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4)
由于我谈论并且写了些工作中使用 PDF 及其工具的文章,有些人认为我喜欢这种格式。其实我并不是,由于各种原因,我不会深入它。
我不会说 PDF 是我个人和职业生活中的一个躲不开的坏事 - 相反,它们不是那么好。通常即使有更好的替代方案来交付文档,我也必须使用 PDF。
当我使用 PDF 时,通常是在白天工作时在其他的操作系统上使用,我使用 Adobe Acrobat 进行操作。但是当我必须在 Linux 桌面上使用 PDF 时呢?我们来看看我用来操作 PDF 的两个图形工具。
### PDF-Shuffler
顾名思义,你可以使用 [PDF-Shuffler][1] 在 PDF 文件中移动页面。它可以做得更多,但软件的功能是有限的。这并不意味着 PDF-Shuffler 没用。它有用,很有用。
你可以将 PDF-Shuffler 用来:
* 从 PDF 文件中提取页面
* 将页面添加到文件中
* 重新排列文件中的页面
请注意PDF-Shuffler 有一些依赖项,如 pyPDF 和 python-gtk。通常通过包管理器安装它是最快且最不令人沮丧的途径。
假设你想从 PDF 中提取页面,也许是作为你书中的样本章节。选择**文件>添加**打开 PDF 文件。
![](https://opensource.com/sites/default/files/uploads/pdfshuffler-book.png)
要提取第 7 页到第 9 页,请按住 Ctrl 并单击选择页面。然后,右键单击并选择**导出选择**。
![](https://opensource.com/sites/default/files/uploads/pdfshuffler-export.png)
选择要保存文件的目录,为其命名,然后单击**保存**。
要添加文件 - 例如,要添加封面或重新插入已扫描的且已签名的合同或者应用 - 打开 PDF 文件,然后选择**文件>添加**并找到要添加的 PDF 文件。单击**打开**。
PDF-Shuffler 有个不好的东西就是在你正在处理的 PDF 文件末尾添加页面。单击并将添加的页面拖动到文件中的所需位置。你一次只能在文件中单击并拖动一个页面。
![](https://opensource.com/sites/default/files/uploads/pdfshuffler-move.png)
### PDF Chain
我是 [PDFtk][2] 的忠实粉丝,它是一个可以对 PDF 做一些有趣操作的命令行工具。由于我不经常使用它,我不记得所有 PDFtk 的命令和选项。
[PDF Chain][3] 是 PDFtk 命令行的一个很好的替代品。它可以让你一键使用 PDFtk 最常用的命令。无需使用菜单,你可以:
* 合并 PDF包括旋转一个或多个文件的页面
  * 从 PDF 中提取页面并将其保存到单个文件中
  * 为 PDF 添加背景或水印
  * 将附件添加到文件
![](https://opensource.com/sites/default/files/uploads/pdfchain1.png)
你也可以做得更多。点击**工具**菜单,你可以:
* 从 PDF 中提取附件
  * 压缩或解压缩文件
  * 从文件中提取元数据
  * 用外部[数据][4]填充 PDF 表格
  * [扁平化][5] PDF
  * 从 PDF 表单中删除 [XML 表格结构][6]XFA数据
老实说,我只使用 PDF Chain 或 PDFtk 提取附件、压缩或解压缩 PDF。其余的对我来说基本没听说。
### 总结
Linux 上用于处理 PDF 的工具数量一直让我感到吃惊。它们的特性和功能的广度和深度也是如此。我通常可以找到一个无论是命令行还是图形它都能做我需要的。在大多数情况下PDF Mod 和 PDF Chain 对我来说效果很好。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/2/manipulating-pdfs-linux
作者:[Scott Nesbitt][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/scottnesbitt
[b]: https://github.com/lujun9972
[1]: https://savannah.nongnu.org/projects/pdfshuffler/
[2]: https://en.wikipedia.org/wiki/PDFtk
[3]: http://pdfchain.sourceforge.net/
[4]: http://www.verypdf.com/pdfform/fdf.htm
[5]: http://pdf-tips-tricks.blogspot.com/2009/03/flattening-pdf-layers.html
[6]: http://en.wikipedia.org/wiki/XFA