mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-28 23:20:10 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
df880074a7
123
published/20200519 24 Linux desktops you need to try.md
Normal file
123
published/20200519 24 Linux desktops you need to try.md
Normal file
@ -0,0 +1,123 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12487-1.html)
|
||||
[#]: subject: (24 Linux desktops you need to try)
|
||||
[#]: via: (https://opensource.com/article/20/5/linux-desktops)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
24 个值得尝试的 Linux 桌面环境
|
||||
======
|
||||
|
||||
> 我全要!
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202008/04/222604tj9mpc66zyzxppbx.jpg)
|
||||
|
||||
Linux 桌面的最大优点之一是它提供给用户选择的权利。如果你不喜欢你屏幕左下角的应用程序菜单,你可以移除它。如果你不喜欢你的文件管理器组织文件的方式,你可以使用另外一个文件管理器。不过,不可否认的是,这对那些不习惯自己选择如何使用计算机的用户来说可能会感到困惑。如果你正在考虑安装 Linux,你要做的选择之一就是你想使用哪一个桌面,最好的方法就是尝试几个不同的桌面,直到你找到感觉适合你的桌面。
|
||||
|
||||
### 默认桌面
|
||||
|
||||
![][2]
|
||||
|
||||
作为在 Fedora、Ubuntu、Debian 和一些其它操作系统上的默认桌面,GNOME 桌面可能是最流行的 Linux 桌面。它有一个易于使用和现代化的界面,并带有为手机环境设计的小点缀,因此即使在触摸屏上也感觉很自然。
|
||||
|
||||
不过,一些 Linux 发行版选择了不同的桌面环境,如 KDE Plasma、Pantheon、Cinnamon 和 Mate。
|
||||
|
||||
* [GNOME][3]: 现代化和易于使用,默认桌面
|
||||
* [Mate][4]: 传统的 GNOME
|
||||
* [KDE][5]: 功能强大、可配置的 Plasma 桌面
|
||||
* [Cinnamon][6]: 经典的 GNOME
|
||||
* [Pantheon][7]: [ElementaryOS][8] 的默认桌面
|
||||
* [Budgie][9]: 一个柔和的桌面
|
||||
* [Trinity][10]: 传统的 KDE
|
||||
|
||||
### 传统的 Unix
|
||||
|
||||
![运行在 Fedora 上的 Window Maker][11]
|
||||
|
||||
Unix 是现代操作系统的鼻祖,也是 Linux 的直接灵感来源,拥有令人吃惊的丰富的桌面历史。大多数人都不熟悉 Unix 桌面设计,因为 Unix 计算机被认为是学术界、科学界和电影界常见的专业机器,而不是家用计算机。如果你是一名 Unix、IRIX 或 NeXT 的用户,那么你可能会对类似于 [CDE][12] 或 NeXTStep 的桌面有着美好的回忆。你很幸运,因为这一传统延续至今:
|
||||
|
||||
* [Windowmaker][13]: NeXT 界面的复兴
|
||||
* [Enlightenment][14]: 一个现代化的改进型 Windowmaker 风格的桌面
|
||||
* [Fluxbox][15]: 跳出 Blackbox 思维定式
|
||||
* [Openbox][16]: 改善 Blackbox 的可用性
|
||||
* [TWM][17]: 与 X11 绑定至死的示例桌面
|
||||
* [Fvwm][18]: 改进的 TWM
|
||||
|
||||
### 轻量级桌面
|
||||
|
||||
![XFCE in 2019 年 在 Mageia Linux 上的][19]
|
||||
|
||||
你可能想知道为什么 Linux 有那么多的桌面可供选择。你可以把它归结为个人喜好和对效率低下的低容忍度,但优化用户界面也有技术上的好处。例如,老电脑难以跟上用户界面的更新,可以使用轻量级桌面[赋予它新的生命](<https://opensource.com/article/20/2/macbook-linux-elementary>) 。另外,你可能只是想把 CPU 处理能力分配到除桌面以外的其它东西上,所以保持你的主用户界面极简是有意义的。不管你的动机是什么,这里有一些你可以尝试的桌面:
|
||||
|
||||
* [XFCE][20]: 熟悉的桌面,极少的性能损失
|
||||
* [LXQT 和 LXDE][21]: 熟悉的桌面,较少的性能损失
|
||||
* [PekWM][22]: 一个 Blackbox 式的窗口管理器
|
||||
* [Joe's Window Manager][23]: 另一个 Blackbox 式的窗口管理器
|
||||
* [Ratpoison][24]: 不使用鼠标
|
||||
* [Herbstluftwm][25]: 针对 [Vim 用户][26] 的Ratpoison
|
||||
* [Lumina][27]: 一个为 PC-BSD 开发的桌面
|
||||
|
||||
### 实验性桌面
|
||||
|
||||
![Unix 桌面环境][28]
|
||||
|
||||
当创建一个桌面并将其集成到一个系统中相对容易的时候,会发生的事情之一就是你会得到一些有趣的概念验证项目和试验性项目。有一些会比其它的更精致,有一些则不是很容易安装。这些很可能注定不会成为你的永久桌面,但是它们可以是很有趣的体验:
|
||||
|
||||
* [Unix Desktop Environment][29]: 该桌面的重塑版
|
||||
* [Rox][30]: 在它那个时代是先进和现代的桌面
|
||||
* [MLVWM][31]: 要是 Apple IIe 运行 Unix 怎么样?
|
||||
* [Equinox][32]: 只是个最基础的东西
|
||||
|
||||
### 选择你的桌面
|
||||
|
||||
如果太多的选择让你不知所措,那么记住:桌面意味着 *可选*。你没有义务来尝试发行版附带的多个桌面。
|
||||
|
||||
许多 Linux 的高级用户都会满足于他们的发行版所提供的某个桌面。最重要的是得到一个可以与你的计算机一起工作的 Linux 系统系统,并花费时间来学习它是如何工作的。归根结底,所有的桌面都只是为了做同一件事:帮助你组织和管理你的重要数据。让你了解你的桌面是如何工作的,这才是最重要的。但是如果你已经了解了你的默认桌面的各个方面,那你现在有了可以在周末尝试的大量选择。祝你玩得开心!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/5/linux-desktops
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux-penguins.png?itok=yKOpaJM_ (Penguins)
|
||||
[2]: https://opensource.com/sites/default/files/advent-gnome.jpg
|
||||
[3]: https://linux.cn/article-11675-1.html
|
||||
[4]: https://linux.cn/article-11703-1.html
|
||||
[5]: https://linux.cn/article-11728-1.html
|
||||
[6]: https://linux.cn/article-8606-1.html
|
||||
[7]: https://linux.cn/article-11660-1.html
|
||||
[8]: https://elementary.io/
|
||||
[9]: https://linux.cn/article-10547-1.html
|
||||
[10]: https://opensource.com/article/19/12/linux-trinity-desktop-environment-tde
|
||||
[11]: https://opensource.com/sites/default/files/uploads/advent-windowmaker.jpg (Window Maker running on Fedora)
|
||||
[12]: https://sourceforge.net/projects/cdesktopenv/
|
||||
[13]: https://linux.cn/article-11650-1.html
|
||||
[14]: https://opensource.com/article/19/12/linux-enlightenment-desktop
|
||||
[15]: https://linux.cn/article-12082-1.html
|
||||
[16]: https://linux.cn/article-11698-1.html
|
||||
[17]: https://linux.cn/article-11734-1.html
|
||||
[18]: https://linux.cn/article-11712-1.html
|
||||
[19]: https://opensource.com/sites/default/files/advent-xfce.jpg (XFCE on Mageia Linux in 2019)
|
||||
[20]: https://linux.cn/article-10413-1.html
|
||||
[21]: https://opensource.com/article/19/12/lxqt-lxde-linux-desktop
|
||||
[22]: https://linux.cn/article-11670-1.html
|
||||
[23]: https://opensource.com/article/19/12/joes-window-manager-linux-desktop
|
||||
[24]: https://opensource.com/article/19/12/ratpoison-linux-desktop
|
||||
[25]: https://linux.cn/article-11734-1.html
|
||||
[26]: https://opensource.com/resources/what-vim
|
||||
[27]: https://linux.cn/article-11706-1.html
|
||||
[28]: https://opensource.com/sites/default/files/uploads/advent-ude.jpg (Unix Desktop Environment)
|
||||
[29]: https://opensource.com/article/19/12/linux-unix-desktop-environment-ude
|
||||
[30]: https://linux.cn/article-12123-1.html
|
||||
[31]: https://linux.cn/article-11720-1.html
|
||||
[32]: https://opensource.com/article/19/12/ede-linux-desktop
|
@ -0,0 +1,65 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (JonnieWayy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-12485-1.html)
|
||||
[#]: subject: (Balloon-powered internet service goes live in Kenya)
|
||||
[#]: via: (https://www.networkworld.com/article/3566295/balloon-powered-internet-service-goes-live-in-kenya.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
气球驱动的互联网服务在肯尼亚上线
|
||||
======
|
||||
|
||||
> Alphabet 的衍生产品 [Loon][1] 使用气球创建了一个由蜂窝塔构成的漂浮网络。
|
||||
|
||||
![](https://images.idgesg.net/images/article/2020/07/loon-aerial-100852193-large.jpg)
|
||||
|
||||
ISP [Telkom Kenya][2] 正在启动第一个使用气球的商业化 4G LTE 服务,气球的作用是在漂浮在平流层中作为蜂窝塔网络。
|
||||
|
||||
据 Alphabet 的衍生产品及底层技术提供商 [Loon][1] 的首席执行官 Alastair Westgarth 所说,这项服务起初将会覆盖肯尼亚接近 19000 平方英里的范围。 Westgarth 在 [Medium][3] 上的一篇文章中说,将会有大约 35 个或更多的气球组成编队,它们持续不断地移动,漂浮在地表上方大约 12 英里的平流层中。“我们将 Loon 称为漂浮的蜂窝塔网络。” Westgarth 说道。
|
||||
|
||||
Telkom Kenya 的首席执行官 Mugo Kibati 在一篇[新闻稿][4]中提到,传统互联网对肯尼亚的服务不足,这是采用这种输送装置的原因。“…… 具有互联网功能的气球能够为生活在偏远地区的许多肯尼亚人提供联系,这些地区服务不足或是完全没有服务,仍然处于不利地位。” Kibati 说道。远程医疗和在线教育是两个预期的用例。
|
||||
|
||||
在测试中, Loon 实现了 19 毫秒延迟的 18.9 Mbps 下行速度,以及 4.74 Mbps 的上行速度。 Westgarth 说,该服务能够用于“语音通话、视频通话、 YouTube、 WhatsApp、电子邮件、发短信、网页浏览”和其他应用程序。
|
||||
|
||||
从更大的角度看,从平流层提供互联网服务对于[物联网(IoT )][5]来说是一个诱人的主张。在高空,网络覆盖范围可能会更广泛,并且覆盖范围可以随着需求的变化而变化(例如,采矿区的移动)。此外,要建立或处理的地面基础设施更少。 比方说,开发人员可以避免铺设电缆所需的私有地产的纠纷。
|
||||
|
||||
可以想象,服务中断也更加可控。提供商可以发射另一台设备,而不必通过复杂的远程地面基础设施来跟踪故障。备用气球可随时备用。
|
||||
|
||||
### 基于无人机的互联网交付
|
||||
|
||||
另一家正在探索大气层互联网的组织是软银,它称其 260 英尺宽的 HAWK30 无人机是“平流层中的漂浮基站”。(参见相关故事:[软银计划到 2023 年实现无人机交付的物联网和互联网][6])
|
||||
|
||||
日本大型电信公司对平流层传输的互联网感兴趣的原因之一是,该群岛易于发生自然灾害,例如地震。与传统的基站相比,地球上空的浮动基站更容易移动,从而可以更快、更灵活地应对自然灾害。
|
||||
|
||||
实际上,Loon 的气球已经成功地用于在灾难后提供互联网服务:例如,在 2017 年波多黎各的飓风 Maria 之后,Loon 提供了连接。
|
||||
|
||||
Westgarth 说,自最初开发以来,Loon 的气球已经取得了长足的发展。现如今,发射是通过自动设备执行的,该设备可以每半小时一次将与地面站点相连的气球推到 60000 英尺高空,而不像以前那样人工进行。
|
||||
|
||||
机器学习算法会处理导航,以尝试向用户提供持续的服务。但是,这并非总是可能的,因为风(尽管在地面上没有那么大)和受限的空域都会影响覆盖范围,尽管 Westgarth 称之为“精心编排组织的气球舞蹈”。
|
||||
|
||||
此外,这些设备是太阳能供电的,这意味着它们只能够在白天工作并提供互联网(或重新定位自身,或向其他气球传输互联网)。出于上述原因和其他的一些原因, Westgarth 和 Kibati 指出,气球必须扩大现有的基础设施和计划,但这并不是一个完整的解决方案。
|
||||
|
||||
Westgarth 说:“为了连接现在和将来需要它的所有人员和事物,我们需要开阔我们的思维;我们需要在连通性生态系统中增加新的一层。”
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3566295/balloon-powered-internet-service-goes-live-in-kenya.html
|
||||
|
||||
作者:[Patrick Nelson][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[JonnieWayy](https://github.com/JonnieWayy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Patrick-Nelson/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://loon.com/
|
||||
[2]: https://www.telkom.co.ke/
|
||||
[3]: https://medium.com/loon-for-all/loon-is-live-in-kenya-259d81c75a7a
|
||||
[4]: https://telkom.co.ke/telkom-and-loon-announce-progressive-deployment-loon-technology-customers-july
|
||||
[5]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
|
||||
[6]: https://www.networkworld.com/article/3405170/softbank-plans-drone-delivered-iot-and-internet-by-2023.html
|
||||
[7]: https://www.facebook.com/NetworkWorld/
|
||||
[8]: https://www.linkedin.com/company/network-world
|
@ -1,77 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (3 reasons to contribute to open source now)
|
||||
[#]: via: (https://opensource.com/article/20/6/why-contribute-open-source)
|
||||
[#]: author: (Jason Blais https://opensource.com/users/jasonblais)
|
||||
|
||||
3 reasons to contribute to open source now
|
||||
======
|
||||
Now, more than ever, is the ideal time to contribute to open source.
|
||||
Here’s why.
|
||||
![Business woman on laptop sitting in front of window][1]
|
||||
|
||||
Open source software has [taken over the world][2]. From the early days of Linux and MySQL, open source is driving innovation like never before, with more than [180,000 public repositories on GitHub][3] alone.
|
||||
|
||||
For those of you who have not yet ventured into the open source world, here are the three reasons to start today.
|
||||
|
||||
### Build your confidence as a developer
|
||||
|
||||
If you're young, early in your career, or are even just learning a new programming language, open source is the best way to get started.
|
||||
|
||||
By contributing to an open source project, you receive immediate feedback on your development and programming skills. You may get suggestions about the choice of a function name, the way you used conditional logic, or how using a goroutine you didn't know about speeds up the execution of your program. This is all invaluable feedback to receive when you're learning something new.
|
||||
|
||||
Moreover, as you create more pull requests and apply what you learned from previous submissions, you begin to learn how to write good code and [submit great pull requests for code review][4]. Finally, many open source projects offer mentorship programs to help guide you through your first few contributions. It is a very welcoming, safe environment to build your confidence as a developer.
|
||||
|
||||
For an example story, read about [Allan Guwatudde's experience in open source][5] as a self-taught developer.
|
||||
|
||||
### Build your resume or CV
|
||||
|
||||
Even if you're a seasoned developer, you may want to build your resume to help with career development and future job searches. Perhaps you're interested in exploring a new cutting-edge framework or a new programming module, and you don't have opportunities to do either at work.
|
||||
|
||||
You may be able to get experience by registering for a course or finding a way to introduce these concepts at your day job. But when those options are not available (or desirable), open source provides the perfect opportunity! In addition to building your skills and increasing your confidence, all of your open source contributions are public and demonstrate the skills you have mastered and the projects you've tackled. In fact, your open source profile by itself could provide you with a strong portfolio that sets you apart from other job candidates.
|
||||
|
||||
Moreover, many open source projects—[such as Mattermost][6]—allow you to add yourself as a Contributor on LinkedIn to directly promote your professional profile.
|
||||
|
||||
[Read about Siyuan Liu's journey][7] from the first open source contribution to becoming a two-time MVP of the Mattermost project.
|
||||
|
||||
### Build your professional network
|
||||
|
||||
Building a strong professional network can help you achieve your career goals, learn more about your own or adjacent fields, and help with a job search. Contributing to open source is an excellent way to build that network. You join a welcoming community of hundreds or thousands of contributors, interact with likeminded developers in the open source space, and build connections along the way. You might even get introduced to key people in the industry, like the maintainer of a high-profile open source tool. Such relationships can turn into career-changing connections.
|
||||
|
||||
Finally, contributing to an open source project may even land you a job! For example, [Mattermost][8] has hired several contributors from its open source community to work full-time on the engineering team.
|
||||
|
||||
### Start contributing to open source today
|
||||
|
||||
Open source empowers you to build your confidence as a developer, build your resume, and build your professional network. Moreover, your contribution—no matter how big or small—makes a direct impact on the future of the open source project. That's why many projects send gifts as a thank you to contributors (e.g., a [customized mug to all first-time contributors][9]).
|
||||
|
||||
Ready to get started with open source? Check out [these open source projects][10] for first-time open source contributions or find out [how to contribute to Mattermost][11] to get started.
|
||||
|
||||
You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can...
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/6/why-contribute-open-source
|
||||
|
||||
作者:[Jason Blais][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jasonblais
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
|
||||
[2]: https://techcrunch.com/2019/01/12/how-open-source-software-took-over-the-world/
|
||||
[3]: https://github.com/search?q=stars%3A%3E100&s=stars&type=Repositories
|
||||
[4]: https://mattermost.com/blog/submitting-great-prs/
|
||||
[5]: https://mattermost.com/blog/building-confidence-and-gaining-experience-with-good-open-source-projects/
|
||||
[6]: https://docs.mattermost.com/overview/faq.html#can-contributors-add-themselves-to-the-mattermost-company-page-on-linkedin
|
||||
[7]: https://mattermost.com/blog/open-source-contributor-journey-with-mattermost/
|
||||
[8]: https://mattermost.com/careers/
|
||||
[9]: https://forum.mattermost.org/t/limited-edition-mattermost-mugs/143
|
||||
[10]: https://firstcontributions.github.io/
|
||||
[11]: http://mattermost.com/contribute
|
140
sources/talk/20200804 Leaving Google- Five Years On.md
Normal file
140
sources/talk/20200804 Leaving Google- Five Years On.md
Normal file
@ -0,0 +1,140 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Leaving Google: Five Years On)
|
||||
[#]: via: (https://theartofmachinery.com/2020/08/04/leaving_google.html)
|
||||
[#]: author: (Simon Arneaud https://theartofmachinery.com)
|
||||
|
||||
Leaving Google: Five Years On
|
||||
======
|
||||
|
||||
About five years ago now, I handed in my Google employee badge and walked out of the Sydney Google office to start a new life of self-employment. I figured I should write up this story because I got a lot out of reading [Michael Lynch’s][1]. As you can see, it’s still taken me a couple of years to get around to writing this post, but I finally told myself that if I don’t write it for the fifth anniversary, I never will.
|
||||
|
||||
This post is kind of long, but I hope it has something useful for new developers who are interested in working at a big tech company, or for big company employees who are wondering what it’s like to quit. I’ll talk about my story of getting into, working at and quitting Google, and what I’ve done since. Feel free to ask if you want more detail about something, though I already have a lot of blog posts to write, so I can’t promise anything in-depth straight away.
|
||||
|
||||
Also, at the risk of labouring the obvious: I haven’t worked at Google for five years, so don’t take this story as a literal description of Google today or what all Google employees experience. However, I think a lot of it’s still relevant to tech careers in general.
|
||||
|
||||
### The windy road to Google
|
||||
|
||||
I got my first paid programming job in 2005. It was working at the local power company, taking some old Pascal code and making it work on a different OS with a different compiler. It was basically just a summer job for extra money while doing the maths and physics degree I’d started that same year. They were happy to have an undergraduate who could do the job; I was just blown away that these grown ups were not only interested in my programming hobby, but actually going to give me real money for it.
|
||||
|
||||
I kept doing stuff like that until I graduated in 2007. I liked programming work, and Google was a cool company doing cool programming stuff, so I applied for an internship. The Google interview process was famous for being tough, so I spent weeks practising on all the Google interview problems I could find online. I don’t think the process has changed much in 13 years: I submitted a résumé, and I got invited to a few rounds of phone interviews that were mostly algorithmic problems (I remember a dynamic programming one and a divide-and-conquer geometric one). I passed the initial interviews, and got invited to come to Sydney for a day of on-site interviews with Google engineers. I went home and waited for what felt like an eternity for the phone call from Google HR. I got rejected.
|
||||
|
||||
It’s natural to feel bad about our rejections and failures, so we don’t talk about them much. But for the same reason, other people don’t talk about theirs, which only makes things worse. When I _did_ get into Google later, I felt like there must be something a bit wrong with me as a “ex-reject”, but one day I was at a table with a bunch of colleagues and the conversation came up. That’s when I discovered that actually a lot of people around me had been rejected at least once. I wasn’t even the “worst”. One guy joked that he must have only got in because Google HR got tired of rejecting him. I’m talking about some pretty impressive engineers, as well — some were responsible for code I use all the time, and I bet you use, too.
|
||||
|
||||
Companies that do interviews usually interview two or more candidates for each hire. That means there are more rejections around than acceptances, so the average interviewee gets rejected more often than not. Yet we keep forgetting that. Four developers go into an interview; one gets hired, the other three rant on social media about how the interview was totally flawed because they personally got rejected. Sure, interviews are far from perfect, but we need to stop taking them so personally.
|
||||
|
||||
Rejection and failure aren’t so bad as long as you can figure out what went wrong and how you could improve yourself. The Google interviews were heavily algorithm-oriented, and I fumbled through a lot of them but definitely didn’t come out shining.
|
||||
|
||||
After the Google rejection, I got two things and took a kind of sabbatical year. The first thing was an Australian Business Number (ABN) that I used to do maths and science tuition, as well as tech job contracts. The other thing I got was a library card at the university science and tech library. I wasn’t planning to interview at Google again, but the interview experience told me there was a lot I didn’t know. I’d give tutorials in the library and read books in between. By the way, a few people thought I was weird for doing all that accounting and stuff for my tuition business, when most tutors just did it cash-in-hand. But I learned a lot that’s helped me later in life, so I don’t regret a thing.
|
||||
|
||||
In 2009, I did a maths honours year (a.k.a, bachelors fourth year) based on the work of a magician-turned-mathematician called Persi Diaconis. The computer science department let me take one of their algorithms units as part of it.
|
||||
|
||||
As I said, I hadn’t planned to interview for Google again, but let me fast forward to how it happened. I’d been studying Japanese since high school, so in 2012 I decided to try living in Tokyo. That mostly worked out, except I made one pretty big mistake: I didn’t have any paper qualifications in Japanese, so it was really hard to get job interviews. Eventually, a friend of mine who had been accepted at Google suggested I give it another try. Like all Google offices, the official business language at Google Tokyo is English, so they didn’t require me to have Japanese qualifications.
|
||||
|
||||
### Google interviews, again
|
||||
|
||||
My friend gave me a recommendation to Google HR. That definitely helps, but don’t get too excited if you get a recommendation, yourself. It ensures your résumé gets noticed (not trivial) and cuts one of the phone interviews, but you still have to pass the remaining phone and on-site interviews.
|
||||
|
||||
This time I practised using problems from [Project Euler][2] and [Google CodeJam][3]. I had to do some live programming in a Google Doc during the phone interview, which was a bit awkward, but otherwise the phone interviews went okay. Then I got invited to the Mori Tower office in Roppongi for a day of onsite interviews.
|
||||
|
||||
![Mori Tower in Tokyo, where I interviewed for Google. It's the sixth tallest building in the city, which means it's huge. \(Photo from here.\)][4]
|
||||
|
||||
My first interview went terribly. I got brain freeze. I knew I could solve the problem, but I couldn’t think straight until the interviewer walked out of the room. Instantly I relaxed and recognised it as a ternary search problem. That was pretty frustrating, but I decided to just keep going and see how the rest of the interviews went.
|
||||
|
||||
Two of the interviews were bad. One is still today the worst interview question I’ve ever had. The interviewer said, “You run a program twice with the same input and get different results. Tell me why.” I replied, “When that’s happened on modern computers and I didn’t expect it, it’s usually been a race condition.” He just said, “No, it’s not a race condition,” and looked at me waiting for my next answer. The question could have been a great question if he’d been interested in a discussion, but apparently he really did just want to play “guess the secret number”. For almost everything I said, he simply replied, “No.” Apparently the program was fully deterministic, stored no state, and had no dependence on the environment (such as disk or the real time clock), but gave different results each time it was executed. I suspect we had a different understanding of what “stored state” or “environment” meant or something, but I had no way to tell. At one point (getting desperate) I tried asking if temperature changes in the electronic components were having an effect, and he said, “No, that would be a race condition, and I’ve already told you it’s not a race condition.” Eventually the interview ended, and I still don’t know what that secret number was.
|
||||
|
||||
I’m telling that story because I’ve heard much tamer horror stories being told as proof that interviewers are terrible people who hate interviewees. But, contrary to popular stereotype, most of the interviews that day were basically okay, and the interviewers were friendly and respectful. Interviewing is genuinely really hard, too, so it’s good to cut interviewers some slack. Hopefully, the “guess the number” interviewer got feedback from Google HR that his question just wasn’t helpful for making hiring decisions.
|
||||
|
||||
This time, the interviews resulted in an offer, but with a little catch: the job was in Sydney, working as a site reliability engineer. I’d never heard of SRE before, but I had a phone call with a senior Sydney SRE who explained that he’d noticed my experience doing embedded engineering in the natural gas industry, and thought SRE would be a good fit because of a similar emphasis on reliability and fitting tight constraints.
|
||||
|
||||
Having spent about a year building up a life in Tokyo, I didn’t want to drop everything and move to Sydney, but no way in hell was I in a position to turn down an offer from Google. I did make one very stupid mistake when talking with the recruiter: I got asked how much money I was making, and I blurted it right out. [Don’t do that.][5] It means it doesn’t matter what happens in the interview, or how much you were being underpaid at your previous job, or whatever; you’ll probably either be rejected or get offered some token amount on top of your old pay and be treated as crazy and unreasonable if you try to negotiate more. In my case, I was making much less than even an entry-level position at Google. I can’t say for sure that’s the whole story, but in 2013 I moved to Sydney to be a new-grad level SRE on Google Maps.
|
||||
|
||||
### Google Maps SRE at Sydney
|
||||
|
||||
A product like Maps is really several software projects, each with its own team of developers. Even a feature like route-finding is really multiple software projects — from gathering transport timetable data, to calculating routes, to rendering results, etc. There are two sides to the SRE job: One is being oncall for the various projects, responding in real time to any production incidents. The other side of the job (when there aren’t any fires to fight) is applying experience from production incidents to other projects and pre-emptively finding ways they could go wrong, or opportunities to make them perform better. Google’s SREs also act like an internal consulting group for developers with questions about deployment practices, or automation, or monitoring, or things like that.
|
||||
|
||||
The work was pretty intense. As a team, we were expected to deal with at least one production incident a week, or else take on responsibility for more services. Every week, all the SREs in Sydney would get together to swap stories of failures that had happened, or new tips for how to make things work better. The learning curve felt like being an undergraduate again.
|
||||
|
||||
I sometimes get a shocked, “But don’t you miss the benefits?!” from people who hear I chose to quit Google. The material benefits (like meals, etc.) are definitely nice, but they’re things that you can buy, so, no, they’re not things I miss. If you ask me what I miss, I’d say it’s the people who worked there. Contrary to what you might have heard, arrogant people don’t enjoy working at places like Google. There’s an infamous story of a narcissist who got a job at Google and kept embarrassing himself by pretending to be a top expert in all kinds of things. He lasted less than half a year before leaving. Overall, the culture was very low on arrogance and blame slinging and politics compared to other places I’ve worked at. On the other hand, Google doesn’t have a monopoly on nice colleagues.
|
||||
|
||||
There’s one kind of corporate politics that was a big problem, though. Getting promoted required “demonstrating impact”, and it was well known that the easiest way to do that was to launch some new thing (not the only way, but easiest). The result was Googlers who were more interesting in promoting their own alpha-quality, prototype solutions to problems than improving existing solutions. We had a standing joke in SRE that there were two kinds of software inside Google: old things that worked well but were deprecated and were Ungoogly to even consider using, and hot new things that were the 100% official tools to use today even though they didn’t work yet. As SREs, we often saw first hand what went wrong with the new hotness (which sometimes became the old deprecated thing before it even got out of alpha). ([I’ve talked more in depth about this kind of thing before.][6])
|
||||
|
||||
This isn’t something that we cynical SREs just imagined; it was openly recognised as a problem in the company, and I remember being reassured that promotion committees had started looking for evidence of impact through things like maintenance work.
|
||||
|
||||
### The promotion application
|
||||
|
||||
In 2015, after working at Google for a couple of years, my manager told me it really was about time to apply for a promotion above my new-grad level. The promotion process was centrally managed through promotion committees twice a year. You’d make your application and back it up with a short description of projects you’d worked on, supported by references from your colleagues. The committee would do a review and give you the thumbs up or down. Your manager’s recommendation alone wasn’t enough because your manager had an incentive to get you promoted. Having high-ranked staff under you helps your own career advancement.
|
||||
|
||||
To cut a long story short, I made my application and the committee said no. Actually, it was a pretty damning no. I don’t remember the response in detail, but it felt like the committee had just gone hunting through my application looking for things to be dismissive about. For example, one project I’d worked on was an internal tool that was building up a backlog of feature requests. I’d looked at the project and figured out that the root problem was that it had outgrown the key-value store it had been built on, and needed a proper database. I argued for switching to a relational DB, and I went ahead and implemented it: schema, data migration, queries, the live site migration, etc. The new queries were much faster, and (more importantly) the new features could be supported efficiently. One problem I had to solve before migrating was that most of the code wasn’t covered by tests, and that was because most of the code wasn’t testable. I refactored the code using dependency injection and [other tricks I’ve talked about before][7], and that let me build a regression test suite. I remember that project was mostly dismissed with the comment that writing unit tests is “new-grad-level work”.
|
||||
|
||||
My manager was really supportive and wrote an appeal. He didn’t show it to me, but I think it was several pages that could be reduced down to “WTF” (argued more eloquently and with more detail). Here are some of the reasons I also thought this response was a bit WTF:
|
||||
|
||||
Google SRE has a concept of “point-personship”. The point person for a project has two roles: One is to know the software project to a greater depth than other SREs, so that you can answer questions they might have. The other role is to be the first point of contact for the devs on the project itself, so that they can get answers to all their SRE questions. The Google job ladder guide said that point-personship wasn’t required at the new-grad level, but looked good for promotion. As my application had said, I was point person for three projects.
|
||||
|
||||
My point-personships made it easy to find senior developers who agreed to help support my promotion application. They were all shocked when they found out I was new-grad level. They’d all agreed to support my application assuming I was already at a higher level.
|
||||
|
||||
On my application, I mentioned being a mentor for a group of new-grad interns we had. When I made my application, many of them were being hired as permanent employees. I was senior enough to be their mentor, but firmly not enough to be promoted above their level.
|
||||
|
||||
The response to my manager’s appeal took a completely different tack from the original review. This time I was “strongly exceeding expections for my [new-grad] job level”, but the problem was that they just needed a little bit more time to be sure I could be promoted to new-grad-plus-one. I was told I could keep strongly exceeding expectations for another six months until the next promotion cycle, and maybe I’d get a promotion then. The appeal was over; that was the deal.
|
||||
|
||||
I wrote an email that I was taking another option. Like many tech companies, Google has an employee stock program. You’re given a nominal grant when you start work, and you actually receive real shares at various “vestment” milestones. My next stock vestment was a couple of months away. The day after that, I wouldn’t be working for Google any more.
|
||||
|
||||
### My reasons for quitting
|
||||
|
||||
The decision to quit any job isn’t easy, and one day you might face the same decision. Here are some of the factors that helped me make my choice. ([Some of this thinking I explained in more depth in an older post.][8])
|
||||
|
||||
If you think about it, given that I wasn’t literally a new grad, Google’s review should have been something like, “You’re doing some things very wrong. You simply won’t get a promotion until you improve at X and Y and Z.” Being told, “You’re strongly exceeding expectations, but we need another six months or so,” didn’t make any sense. No one raised concerns about whether I was capable of doing my job. I was getting a lot of excuses, but not any useful feedback to help me do better. (NB: sometimes you have to explicitly ask for feedback. Managers can fall into the trap of defending the performance ratings they give, instead of thinking about the report’s need for feedback.)
|
||||
|
||||
I also wasn’t sure what the promotion committee might see in six months that they hadn’t already seen in two years. Why wouldn’t they ask for another six months again? If I needed to prove myself for years to get new-grad-plus-one, how old would I be before I got new-grad-plus-two?
|
||||
|
||||
When I first started at Google, my job level was irrelevant because I was learning so much and getting a famous company on my résumé. Two years in, the equation was different. The value of the future that Google was offering me was waning, while the value of opportunities outside Google had gone up. Google job levels mean practically nothing outside Google. In the past five years, plenty of people have asked about what I did at Google, but not a single person has asked me what my Google job level was, or called me a new grad. Although I took a financial hit short term, I effectively got a promotion that day I handed in my badge.
|
||||
|
||||
Credit where it’s due, Google didn’t do anything like this, but it’s common in other companies: trying to make employees feel guilty about asking for pay rises. At a place I worked a few years ago, some engineers asked for a payrise after a highly successful launch following a lot of crunch time. Management played the victim and accused the engineers of “twisting their arms”. (About six months later they lost most of their engineering team.) If you’re genuinely co-operative about the timing of when you might quit (e.g., after a launch date, not the week before) and willing to document your knowledge and clean up after yourself, etc., you’re only twisting your employers’ arms by as much as they’re underpaying you.
|
||||
|
||||
Nominally, I left a large amount of unvested stock behind at Google. But stock isn’t yours until it’s yours. I just had a promise of being paid shares in future, and I could convert it to an equivalent pay rate by dividing it by time required. Working two months for that vestment was worth it. Working years for the remaining vestments wasn’t. Don’t fall for endowment bias.
|
||||
|
||||
When shouldn’t you quit? Well, are you’re getting a good deal compared to what you could get elsewhere? Corporate career paths aren’t mandated by heaven; they’re a series of business offers representing what the company estimates you’ll work for. If you think you’re getting a good deal (considering all compensation and intangibles like the work environment), great! Otherwise, it’s time to think hard about what to do next.
|
||||
|
||||
### After Google
|
||||
|
||||
I should warn you that I took a strategy that was high growth, at the expense of short-term stability. If stability is more important to you, you’ll do things differently. My plan A, plan B and plan C all fell apart, and I ended up spending a few months struggling to find a way. Eventually I got a contract at a small web shop, working on [Safety Town][9], a government road safety website for kids. The pay was a big cut from Google, especially considering it was my first work in months. But, you know, I really enjoyed that project. Sure, it wasn’t “cool” like Google, and maybe some kids at school didn’t think it was cool. On the other hand, at Google I was a tiny part of a huge thing. Safety Town had a small team, with everyone playing a crucial role. For part of the Safety Town project, I was _the_ backend engineer, and Safety Town was the only thing I had to worry about at that time. And, heck, maybe some kids have learned a thing or two about road safety from that website. I’ve done plenty of projects since then, most of them bigger, but I still show people Safety Town.
|
||||
|
||||
![Screenshot of Safety Town home page, owned by Australian NSW government.][10]
|
||||
|
||||
I remember a poster in the Sydney Google office that said, “Shoot for the moon! Even if you miss, you’ll land among the stars!” It’s easy to forget that you can have a quality life even if you’re not doing moonshots for famous companies, or doing moonshots for startups.
|
||||
|
||||
Here’s one trick that helped me get contracts. I’d go to Sydney tech events, stand within view of the job board, and wait until I saw someone writing on it. Suppose they were writing about CSS development for an insurance company project. Even if I weren’t especially interested in CSS or insurance, I’d wander over and say, “Hi, what kind of insurance project is that?” It’s the easiest conversation starter because their head’s full of the project while they’re trying to fit it into a tiny space on the job board. Usually the conversation still wouldn’t lead to a job for me, but occasionally I’d discover something I could help with. Some events don’t have a job board, but the organisers are often glad to offer the microphone to someone for a few minutes. It adds community engagement to their events.
|
||||
|
||||
I got a major break after working on a website for government procurement, just because I learned to not be so clueless about government procurement. It’s hard to say exactly how much that knowledge was worth, but less than a year afterwards I signed a government contract for about 40% more than I would have hoped was possible before. (I don’t do so much government and big enterprise work nowadays, though.)
|
||||
|
||||
After about a year and a half, I had my own one-person company. As I built up a reputation, I gradually got more SRE-like work. Basically, doing dev work was my “in”, then several months later I’d get contacted by someone who needed SRE/DevOps help and remembered me. I actually like both SRE and pure dev work, but supply and demand means SRE work is good business. I can still do programming in my spare time.
|
||||
|
||||
Speaking of which, work/life balance is my favourite thing about my new lifestyle. No one pays me between contracts, but I can make the most of it by learning new things doing side projects. After one long, intense contract, I took a break and did [a month-long backpacking trip exploring rural Japan][11]. It was a trip I’d wanted to do for a long time, but before Google I needed more money, and during Google I needed more time. Being self-employed is far from stress free and isn’t for everyone, but there’s stress that makes you feel dead, and there’s stress that makes you feel more alive. For me, self-employment is the second kind, and I’d say I’ve been less stressed overall in the past five years than I was while at Google. In my case, at least, I can honestly say I don’t regret joining Google when I did, and I don’t regret leaving when I did, either.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://theartofmachinery.com/2020/08/04/leaving_google.html
|
||||
|
||||
作者:[Simon Arneaud][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://theartofmachinery.com
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://mtlynch.io/why-i-quit-google/
|
||||
[2]: https://projecteuler.net
|
||||
[3]: https://codingcompetitions.withgoogle.com/codejam
|
||||
[4]: https://theartofmachinery.com/images/leaving_google/mori-tower.jpg
|
||||
[5]: https://www.kalzumeus.com/2012/01/23/salary-negotiation/
|
||||
[6]: https://theartofmachinery.com/2019/03/19/hello_world_marketing.html
|
||||
[7]: https://theartofmachinery.com/2016/03/28/dirtying_pure_functions_can_be_useful.html
|
||||
[8]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html
|
||||
[9]: https://www.safetytown.com.au/
|
||||
[10]: https://theartofmachinery.com/images/leaving_google/safetytown.png
|
||||
[11]: https://theartofmachinery.com/2018/03/23/seto_trip_1.html
|
@ -1,87 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Bypass your Linux firewall with SSH over HTTP)
|
||||
[#]: via: (https://opensource.com/article/20/7/linux-shellhub)
|
||||
[#]: author: (Domarys https://opensource.com/users/domarys)
|
||||
|
||||
Bypass your Linux firewall with SSH over HTTP
|
||||
======
|
||||
Remote work is here to stay; use this helpful open source solution to
|
||||
quickly connect and access all your devices from anywhere.
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
With the growth of connectivity and remote jobs, accessing remote computing resources becomes more important every day. But the requirements for providing external access to devices and hardware make this task complex and risky. Aiming to reduce this friction, [ShellHub][2] is a cloud server that allows universal access to those devices, from any external network.
|
||||
|
||||
ShellHub is an open source solution, licensed under Apache 2.0, that covers all those needs and allows users to connect and manage multiple devices through a single account. It was developed to facilitate developers' and programmers' tasks, making remote access to Linux devices possible for any hardware architecture.
|
||||
|
||||
Looking more closely, the ShellHub solution uses the HTTP transport layer to encapsulate the SSH protocol. This transport layer choice allows for seamless use on most networks as it is commonly available and accepted by most companies' firewall rules and policies.
|
||||
|
||||
These examples use ShellHub version 0.3.2, released on Jun 10, 2020.
|
||||
|
||||
### Using ShellHub
|
||||
|
||||
To access the platform, just go to [shellhub.io][3] and register yourself to create an account. Your registration data will help the development team to understand the user profile and provide more insight into how to improve the platform.
|
||||
|
||||
![ShellHub registration form][4]
|
||||
|
||||
Figure 1: Registration form available in [shellhub.io][5]
|
||||
|
||||
ShellHub's design has an intuitive and clean interface that makes all information and functionality available in the fastest way. After you've registered, you will be on the dashboard, ready to register your first device.
|
||||
|
||||
### Adding a device
|
||||
|
||||
To enable the connection of devices via ShellHub, you'll need to generate an identifier that will be used to authenticate your device when it connects to the server.
|
||||
|
||||
This identification must be configured inside the agent (ShellHub client) that will be saved in the device along with the image or it must be added as a Docker container.
|
||||
|
||||
By default, ShellHub uses Docker to run the agent, which is very convenient, as it provides frictionless addition of devices on the existing system, with Docker support being the only requirement. To add a device, you need to paste the command line, which is presented inside the ShellHub Cloud dialog (see Figure 2).
|
||||
|
||||
![Figure 2: Adding a device to the ShellHub Cloud][6]
|
||||
|
||||
By default, the device uses its MAC address as its hostname. Internally, the device is identified by its key, which is generated during the device registration to authenticate it with the server.
|
||||
|
||||
### Accessing devices
|
||||
|
||||
To access your devices, just go to View All Devices in the dashboard, or click on Devices ****on the left side menu; these will list all your registered devices.
|
||||
|
||||
The device state can be easily seen on the page. The online ones show a green icon next to them and can be connected by clicking on the terminal icon. You then enter the credentials and, finally, click the Connect button, see (Figure 3).
|
||||
|
||||
![Figure 3: Accessing a device using the terminal on the web][7]
|
||||
|
||||
Another way to access your devices is from any SSH client like [PuTTY][8], [Termius][9], or even the Linux terminal. We can use the ShellHub Identification, called SSHID, as the destination address to connect (e.g., ssh [username@SSHID][10]). Figure 4 illustrates how we can connect to our machine using the Linux SSH client on the terminal.
|
||||
|
||||
![Figure 4: Connecting to a device using the Linux terminal][11]
|
||||
|
||||
Whenever you log in to the ShellHub Cloud platform, you'll have access to all your registered devices on the dashboard so you can access them from everywhere, anytime. ShellHub adds simplicity to the process of keeping communications secure with your remote machines through an open source platform and in a transparent way.
|
||||
|
||||
Join ShellHub Community on [GitHub][2] or feel free to send your suggestions or feedback to the developers' team through [Gitter][12] or by emailing [contato@ossystems.com.br][13]. We love to receive contributions from community members!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/linux-shellhub
|
||||
|
||||
作者:[Domarys][a]
|
||||
选题:[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/domarys
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
|
||||
[2]: https://github.com/shellhub-io/shellhub
|
||||
[3]: https://www.shellhub.io/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/shellhub_registration_form_0.png (ShellHub registration form)
|
||||
[5]: https://opensource.com/article/20/7/www.shellhub.io
|
||||
[6]: https://opensource.com/sites/default/files/figure2.gif
|
||||
[7]: https://opensource.com/sites/default/files/figure3.gif
|
||||
[8]: https://www.putty.org/
|
||||
[9]: https://termius.com/
|
||||
[10]: mailto:username@SSHID
|
||||
[11]: https://opensource.com/sites/default/files/figure4.gif
|
||||
[12]: https://gitter.im/shellhub-io/community?at=5e39ad8b3aca1e4c5f633e8f
|
||||
[13]: mailto:contato@ossystems.com.br
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
175
sources/tech/20200803 Do math in the Linux shell with GNU bc.md
Normal file
175
sources/tech/20200803 Do math in the Linux shell with GNU bc.md
Normal file
@ -0,0 +1,175 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Do math in the Linux shell with GNU bc)
|
||||
[#]: via: (https://opensource.com/article/20/7/bc-math)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Do math in the Linux shell with GNU bc
|
||||
======
|
||||
Do better math in the shell with bc, a mathematical language for
|
||||
advanced calculation.
|
||||
![old school calculator][1]
|
||||
|
||||
Most [POSIX][2] systems come with [GNU bc][3], an arbitrary precision numeric processing language. Its syntax is similar to C, but it also supports interactive execution of statements and processing data from standard in (`stdin`). For that reason, it's often the answer to the question, "How do I do math in the Linux shell?" This style of response is common online:
|
||||
|
||||
|
||||
```
|
||||
$ echo "1+1" | bc
|
||||
2
|
||||
```
|
||||
|
||||
While that's perfectly valid, few users argue it's elegant compared to something more intuitive, such as:
|
||||
|
||||
|
||||
```
|
||||
$ 1+1 #this does not work
|
||||
2
|
||||
```
|
||||
|
||||
The interactive mode is a little easier:
|
||||
|
||||
|
||||
```
|
||||
$ bc
|
||||
1+1
|
||||
2
|
||||
quit
|
||||
$
|
||||
```
|
||||
|
||||
But interactive modes don't always fit the desired and intuitive workflow of something simple, like just typing in the calculation you want. For this, I suggest Bluebat's [calculator in pure Bash][4].
|
||||
|
||||
What bc actually provides is a mathematical language for advanced calculation.
|
||||
|
||||
### Advanced functions with mathlib
|
||||
|
||||
On its own, `bc` provides basic math functions. You can test them in the interactive mode:
|
||||
|
||||
|
||||
```
|
||||
$ bc
|
||||
3^2
|
||||
9
|
||||
(3^2)*(9)/3
|
||||
27
|
||||
```
|
||||
|
||||
Use the `--mathlib` option to gain advanced functions, including sine, cosine, tangent, and more. In the interactive mode, you can test some of them. Here's the cosine of 90:
|
||||
|
||||
|
||||
```
|
||||
c(90)
|
||||
-.44807361612917015236
|
||||
```
|
||||
|
||||
The sine of 9:
|
||||
|
||||
|
||||
```
|
||||
s(9)
|
||||
.41211848524175656975
|
||||
```
|
||||
|
||||
### Creating your own bc functions
|
||||
|
||||
You can also create your own functions in bc. Function definitions start with the `define` keyword and are enclosed with braces. Here is a simple function entered into an interactive session that returns whatever number it's given:
|
||||
|
||||
|
||||
```
|
||||
$ bc
|
||||
define echo(n) {
|
||||
return (n);
|
||||
}
|
||||
```
|
||||
|
||||
In the same interactive session, test it out:
|
||||
|
||||
|
||||
```
|
||||
echo(2)
|
||||
2
|
||||
echo(-2)
|
||||
-2
|
||||
```
|
||||
|
||||
### If statements in bc
|
||||
|
||||
The bc language also has a variety of control statements, the simplest of which is if/else. The syntax may appear familiar at first glance, but there are subtleties in how braces are handled. Note that the _else_ clause of an if-statement is enclosed in braces, while the _then_ clause is not, but both are terminated with a semicolon. Here's a function to find the absolute value of a number _n_:
|
||||
|
||||
|
||||
```
|
||||
define abso(n) {
|
||||
if ( n > 0 ) return (n);
|
||||
{ return (-n); }
|
||||
}
|
||||
```
|
||||
|
||||
In the same interactive session, test it out:
|
||||
|
||||
|
||||
```
|
||||
abso(-5)
|
||||
5
|
||||
abso(5)
|
||||
5
|
||||
```
|
||||
|
||||
### Importing data into bc
|
||||
|
||||
Working in an interactive session is tolerable for quick calculations and experimentation, but you lose your data when you quit, and it's difficult to edit when you make mistakes. Fortunately, bc can load variables and functions from external files.
|
||||
|
||||
Here's a file containing two variables (`sol` and `foo`) and a custom `abso` function to find an absolute value:
|
||||
|
||||
|
||||
```
|
||||
sol=299792458
|
||||
|
||||
foo=42
|
||||
|
||||
define abso(n) {
|
||||
if ( n > 0 ) return (n);
|
||||
{ return (-n); }
|
||||
}
|
||||
```
|
||||
|
||||
Save this into a file called `bcvars.bc`, so you can import it into a bc interactive session:
|
||||
|
||||
|
||||
```
|
||||
$ bc bcvars.bc
|
||||
foo
|
||||
42
|
||||
sol
|
||||
299792458
|
||||
abso(-23)
|
||||
23
|
||||
```
|
||||
|
||||
### Power-up your math with bc
|
||||
|
||||
The bc language is relatively simple, provided you know enough math to construct the equation for whatever you're trying to accomplish. While bc by default provides useful basic functions and allows you to create your own, you can reduce your workload by standing on the shoulders of giants. Files loaded with new functions, both for mathematic fundamentals as well as for specific tasks (for instance, calculating compound interest), are available from [GNU bc page][5], and [full documentation][6] for bc is available.
|
||||
|
||||
If you're interested in doing better math in a shell, try bc. It won't turn you into a mathematics genius, but it just might make it easier to become one.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/bc-math
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1 (old school calculator)
|
||||
[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
||||
[3]: https://www.gnu.org/software/bc/
|
||||
[4]: https://raw.githubusercontent.com/bluebat/.bash/master/bashbc.sh
|
||||
[5]: http://phodd.net/gnu-bc/
|
||||
[6]: https://www.gnu.org/software/bc/manual/html_mono/bc.html
|
@ -0,0 +1,104 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (An open source solution for continuous testing at scale)
|
||||
[#]: via: (https://opensource.com/article/20/8/cerberus-test-automation)
|
||||
[#]: author: (Antoine Craske https://opensource.com/users/acraske)
|
||||
|
||||
An open source solution for continuous testing at scale
|
||||
======
|
||||
Cerberus focuses on testing usability, scalability, and integration.
|
||||
![Coding on a computer][1]
|
||||
|
||||
In Sogeti's most recent [World Quality Report][2], software testing ranked No. 1 in terms of its contributions to business objectives and growth, making it a key enabler for business digitalization. Despite this, the software testing industry still reports major pain points related to test maintenance, automation, tooling, and skills. Most of the tooling in common use lacks capabilities, is too complex to integrate, provides insufficient intelligence, or is too difficult to use.
|
||||
|
||||
[Cerberus Testing][3] provides a solution to these problems. It is a test automation solution built by retail companies to support digitalization initiatives and focuses on usability, scalability, and integration of the test lifecycle process.
|
||||
|
||||
![Cerberus supports test lifecycle to accelerate feedback loops][4]
|
||||
|
||||
(Cerberus, [CC BY-SA 4.0][5])
|
||||
|
||||
### What is Cerberus?
|
||||
|
||||
Our IT team at La Redoute, a French clothing fashion retailer, began writing the first lines of code of what would become Cerberus in 2010. Our objectives were to automate manual non-regression tests for existing web applications to accelerate and increase the quality of software delivery. We also wanted our in-house solution to enable iterations through test management, execution, and reporting in minutes, rather than weeks.
|
||||
|
||||
Cerberus is based on a Selenium web driver and a three-tier traditional architecture with a Java technology stack. A key requirement for development was to limit code to support usability, reuse, and keeping tests simple.
|
||||
|
||||
At the time we developed Cerberus, most solutions were commercial and designed to address specific silos such as test repositories, execution, or analytics. Cerberus combines the three test silos and enables web, API, and database testing. This is why we chose the name Cerberus, after the [three-headed dog that guards Hades][6] in Greek mythology.
|
||||
|
||||
### Releasing Cerberus as open source
|
||||
|
||||
The first version automated functional testing for an internal customer-relationship management (CRM) solution, and once it was shown to successfully detect dangerous release defects, we considered it to be a product.
|
||||
|
||||
Next, we began using Cerberus to test La Redoute's e-commerce platform. As we shared our experience with the industry, we learned our peers were still struggling with test automation. So, in 2013, knowing the value of open source software for product innovation and development, we released Cerberus on [SourceForge][7] and [GitHub][8] under a GNU General Public License to encourage our community to share code and ideas. As with all open source projects, we make a continuous effort to ensure code quality, documentation, and transparency.
|
||||
|
||||
![Cerberus GitHub repository][9]
|
||||
|
||||
(Antoine Craske, [CC BY-SA 4.0][5])
|
||||
|
||||
During this period, [digital transformation][10] was escalating, making it essential for Cerberus to enable full regression test automation and monitoring. We focused on improving flexibility in test management, execution scalability, and traceability to meet those objectives. Adding end-to-end tests alongside functional tests was key. It enabled us to accelerate the software delivery cycle by more than 10x in certain cases. We published a [case study][11] about our 96% success in daily deployments and more than 6,000 automated tests in a year.
|
||||
|
||||
### Growing interest
|
||||
|
||||
Other French retailers, including Decathlon, Norauto, Leroy Merlin, and Midas, became interested in Cerberus. The emerging community of testers then shared it with other organizations that used the solution to accelerate their digital transformation, primarily for e-commerce and backoffice transformations.
|
||||
|
||||
![Cerberus integrations][12]
|
||||
|
||||
(Cerberus, [CC BY-SA 4.0][5])
|
||||
|
||||
We added standard integrations to Cerberus to increase its usability. A [Jenkins][13] plugin was a key addition to facilitate deployment of CI/CD pipelines with test automation and feedback. Adding support for REST APIs, advanced scheduling, retries, and screenshots enabled Cerberus to further accelerate testing-cycle time. For example, French retailer Leroy Merlin uses Cerberus for [mobile testing at scale][14].
|
||||
|
||||
### Support for continuous testing
|
||||
|
||||
With recent and ongoing updates, organizations can leverage Cerberus' features from development to operations. It expands digital experience test coverage by executing tests on a variety of browsers, devices, and apps. Its native connectors for APIs (including SOAP and REST), desktop applications, and [Apache Kafka][15] enable testing legacy apps, APIs, event-driven microservices, streaming services, business intelligence, data science applications, and other use cases.
|
||||
|
||||
During the software development lifecycle, Cerberus supports fast iterations in test management, execution, and reporting. Users can create test specifications in plain English, compose tests using a library, execute in parallel on various devices, and do advanced reporting. Native integration with CI/CD solutions, such as Jenkins, Bitbucket, and others, combined with one-click ticket creation in Jira and other tools, makes bug resolution faster and easier.
|
||||
|
||||
![Cerberus use cases][16]
|
||||
|
||||
(Cerberus, [CC BY-SA 4.0][5])
|
||||
|
||||
Cerberus can also monitor customer experience and business operations. Tests can be functional and technical, allowing organizations to test complex scenarios. For example, France's leading TV channel, TF1, uses it for quality assurance on its streaming platform.
|
||||
|
||||
Capabilities such as advanced scheduling, alerting, notifications, and web-performance and analytics dashboards make it easier to discover issues and identify bottlenecks with third-party integrations or customer experience problems.
|
||||
|
||||
### Next steps
|
||||
|
||||
We are focusing now on engaging and growing the Cerberus community to accelerate the product's development and adoption. We hold community meetings every two weeks to align the product roadmap and improvements and to balance our product vision with community needs. Improving integrations and usability is vital to producing a successful product experience.
|
||||
|
||||
If you would like to try Cerberus or contribute to the community, please visit our [Cerberus Testing page][8] on GitHub. You can also find us on [LinkedIn][17], [Twitter][18], and [YouTube][19].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/cerberus-test-automation
|
||||
|
||||
作者:[Antoine Craske][a]
|
||||
选题:[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/acraske
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: https://www.sogeti.se/utforska/rapporter/world-quality-report-2019-2020/
|
||||
[3]: https://cerberus-testing.org/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/cerberus_test-lifecycle_0.png (Cerberus supports test lifecycle to accelerate feedback loops)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[6]: https://en.wikipedia.org/wiki/Cerberus
|
||||
[7]: https://sourceforge.net/projects/cerberus-source/files/cerberus-testing-4.4/
|
||||
[8]: https://github.com/cerberustesting/cerberus-source
|
||||
[9]: https://opensource.com/sites/default/files/uploads/cerberus_github.png (Cerberus GitHub repository)
|
||||
[10]: https://enterprisersproject.com/what-is-digital-transformation
|
||||
[11]: https://laredoute.io/blog/96-successful-daily-web-production-deploy/
|
||||
[12]: https://opensource.com/sites/default/files/uploads/cerberus_integrations.png (Cerberus integrations)
|
||||
[13]: https://www.jenkins.io/
|
||||
[14]: https://medium.com/leroymerlin-tech-digital/on-a-construit-une-plateforme-de-test-mobile-b44e2c785c7f
|
||||
[15]: https://kafka.apache.org/
|
||||
[16]: https://opensource.com/sites/default/files/uploads/cerberus_use-cases.png (Cerberus use cases)
|
||||
[17]: https://www.linkedin.com/company/cerberus-testing/
|
||||
[18]: https://twitter.com/cerberustesting
|
||||
[19]: https://www.youtube.com/channel/UCkG4csTjR0V5gl77BHhldBQ
|
267
sources/tech/20200804 Creating and debugging Linux dump files.md
Normal file
267
sources/tech/20200804 Creating and debugging Linux dump files.md
Normal file
@ -0,0 +1,267 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Creating and debugging Linux dump files)
|
||||
[#]: via: (https://opensource.com/article/20/8/linux-dump)
|
||||
[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99)
|
||||
|
||||
Creating and debugging Linux dump files
|
||||
======
|
||||
Knowing how to deal with dump files will help you find and fix
|
||||
hard-to-reproduce bugs in an application.
|
||||
![Magnifying glass on code][1]
|
||||
|
||||
Crash dump, memory dump, core dump, system dump … all produce the same outcome: a file containing the state of an application's memory at a specific time—usually when the application crashes.
|
||||
|
||||
Knowing how to deal with these files can help you find the root cause(s) of a failure. Even if you are not a developer, dump files created on your system can be very helpful (as well as approachable) in understanding software.
|
||||
|
||||
This is a hands-on article, and can you follow along with the example by cloning the sample application repository with:
|
||||
|
||||
|
||||
```
|
||||
`git clone https://github.com/hANSIc99/core_dump_example.git`
|
||||
```
|
||||
|
||||
### How signals relate to dumps
|
||||
|
||||
Signals are a kind of interprocess communication between the operating system and the user applications. Linux uses the signals defined in the [POSIX standard][2]. On your system, you can find the standard signals defined in `/usr/include/bits/signum-generic.h`. There is also an informative [man signal][3] page if you want more on using signals in your application. Put simply, Linux uses signals to trigger further activities based on whether they were expected or unexpected.
|
||||
|
||||
When you quit a running application, the application will usually receive the `SIGTERM` signal. Because this type of exit signal is expected, this action will not create a memory dump.
|
||||
|
||||
The following signals will cause a dump file to be created (source: [GNU C Library][4]):
|
||||
|
||||
* SIGFPE: Erroneous arithmetic operation
|
||||
* SIGILL: Illegal instruction
|
||||
* SIGSEGV: Invalid access to storage
|
||||
* SIGBUS: Bus error
|
||||
* SIGABRT: An error detected by the program and reported by calling abort
|
||||
* SIGIOT: Labeled archaic on Fedora, this signal used to trigger on `abort()` on a [PDP-11][5] and now maps to SIGABRT
|
||||
|
||||
|
||||
|
||||
### Creating dump files
|
||||
|
||||
Navigate to the `core_dump_example` directory, run `make`, and execute the sample with the `-c1` switch:
|
||||
|
||||
|
||||
```
|
||||
`./coredump -c1`
|
||||
```
|
||||
|
||||
The application should exit in state 4 with an error:
|
||||
|
||||
![Dump written][6]
|
||||
|
||||
(Stephan Avenwedde, [CC BY-SA 4.0][7])
|
||||
|
||||
"Abgebrochen (Speicherabzug geschrieben)" roughly translates to "Segmentation fault (core dumped)."
|
||||
|
||||
Whether it creates a core dump or not is determined by the resource limit of the user running the process. You can modify the resource limits with the `ulimit` command.
|
||||
|
||||
Check the current setting for core dump creation:
|
||||
|
||||
|
||||
```
|
||||
`ulimit -c`
|
||||
```
|
||||
|
||||
If it outputs `unlimited`, then it is using the (recommended) default. Otherwise, correct the limit with:
|
||||
|
||||
|
||||
```
|
||||
`ulimit -c unlimited`
|
||||
```
|
||||
|
||||
To disable creating core dumps' type:
|
||||
|
||||
|
||||
```
|
||||
`ulimit -c 0`
|
||||
```
|
||||
|
||||
The number specifies the resource in kilobytes.
|
||||
|
||||
### What are core dumps?
|
||||
|
||||
The way the kernel handles core dumps is defined in:
|
||||
|
||||
|
||||
```
|
||||
`/proc/sys/kernel/core_pattern`
|
||||
```
|
||||
|
||||
I'm running Fedora 31, and on my system, the file contains:
|
||||
|
||||
|
||||
```
|
||||
`/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h`
|
||||
```
|
||||
|
||||
This shows core dumps are forwarded to the `systemd-coredump` utility. The contents of `core_pattern` can vary widely between the different flavors of Linux distributions. When `systemd-coredump` is in use, the dump files are saved compressed under `/var/lib/systemd/coredump`. You don't need to touch the files directly; instead, you can use `coredumpctl`. For example:
|
||||
|
||||
|
||||
```
|
||||
`coredumpctl list`
|
||||
```
|
||||
|
||||
shows all available dump files saved on your system.
|
||||
|
||||
With `coredumpctl dump`, you can retrieve information from the last dump file saved:
|
||||
|
||||
|
||||
```
|
||||
[stephan@localhost core_dump_example]$ ./coredump
|
||||
Application started…
|
||||
|
||||
(…….)
|
||||
|
||||
Message: Process 4598 (coredump) of user 1000 dumped core.
|
||||
|
||||
Stack trace of thread 4598:
|
||||
#0 0x00007f4bbaf22625 __GI_raise (libc.so.6)
|
||||
#1 0x00007f4bbaf0b8d9 __GI_abort (libc.so.6)
|
||||
#2 0x00007f4bbaf664af __libc_message (libc.so.6)
|
||||
#3 0x00007f4bbaf6da9c malloc_printerr (libc.so.6)
|
||||
#4 0x00007f4bbaf6f49c _int_free (libc.so.6)
|
||||
#5 0x000000000040120e n/a (/home/stephan/Dokumente/core_dump_example/coredump)
|
||||
#6 0x00000000004013b1 n/a (/home/stephan/Dokumente/core_dump_example/coredump)
|
||||
#7 0x00007f4bbaf0d1a3 __libc_start_main (libc.so.6)
|
||||
#8 0x000000000040113e n/a (/home/stephan/Dokumente/core_dump_example/coredump)
|
||||
Refusing to dump core to tty (use shell redirection or specify — output).
|
||||
```
|
||||
|
||||
This shows that the process was stopped by `SIGABRT`. The stack trace in this view is not very detailed because it does not include function names. However, with `coredumpctl debug`, you can simply open the dump file with a debugger ([GDB][8] by default). Type `bt` (short for backtrace) to get a more detailed view:
|
||||
|
||||
|
||||
```
|
||||
Core was generated by `./coredump -c1'.
|
||||
Program terminated with signal SIGABRT, Aborted.
|
||||
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
||||
50 return ret;
|
||||
(gdb) bt
|
||||
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
||||
#1 0x00007fc37a9aa8d9 in __GI_abort () at abort.c:79
|
||||
#2 0x00007fc37aa054af in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fc37ab14f4b "%s\n") at ../sysdeps/posix/libc_fatal.c:181
|
||||
#3 0x00007fc37aa0ca9c in malloc_printerr (str=str@entry=0x7fc37ab130e0 "free(): invalid pointer") at malloc.c:5339
|
||||
#4 0x00007fc37aa0e49c in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:4173
|
||||
#5 0x000000000040120e in freeSomething(void*) ()
|
||||
#6 0x0000000000401401 in main ()
|
||||
```
|
||||
|
||||
The memory addresses: `main()` and `freeSomething()` are quite low compared to subsequent frames. Due to the fact that shared objects are mapped to an area at the end of the virtual address space, you can assume that the `SIGABRT` was caused by a call in a shared library. Memory addresses of shared objects are not constant between invocations, so it is totally fine when you see varying addresses between calls.
|
||||
|
||||
The stack trace shows that subsequent calls originate from `malloc.c`, which indicates that something with memory (de-)allocation could have gone wrong.
|
||||
|
||||
In the source code, you can see (even without any knowledge of C++) that it tried to free a pointer, which was not returned by a memory management function. This results in undefined behavior and causes the `SIGABRT`:
|
||||
|
||||
|
||||
```
|
||||
void freeSomething(void *ptr){
|
||||
[free][9](ptr);
|
||||
}
|
||||
int nTmp = 5;
|
||||
int *ptrNull = &nTmp;
|
||||
freeSomething(ptrNull);
|
||||
```
|
||||
|
||||
The systemd coredump utility can be configured under `/etc/systemd/coredump.conf`. Rotation of dump file cleaning can be configured in `/etc/systemd/system/systemd-tmpfiles-clean.timer`.
|
||||
|
||||
You can find more information about `coredumpctl` on its [man page][10].
|
||||
|
||||
### Compiling with debug symbols
|
||||
|
||||
Open the `Makefile` and comment out the last part of line 9. It should now look like:
|
||||
|
||||
|
||||
```
|
||||
`CFLAGS =-Wall -Werror -std=c++11 -g`
|
||||
```
|
||||
|
||||
The `-g` switch enables the compiler to create debug information. Start the application, this time with the `-c2` switch:
|
||||
|
||||
|
||||
```
|
||||
`./coredump -c2`
|
||||
```
|
||||
|
||||
You will get a floating-point exception. Open the dump in GDB with:
|
||||
|
||||
|
||||
```
|
||||
`coredumpctl debug`
|
||||
```
|
||||
|
||||
This time, you are pointed directly to the line in the source code that caused the error:
|
||||
|
||||
|
||||
```
|
||||
Reading symbols from /home/stephan/Dokumente/core_dump_example/coredump…
|
||||
[New LWP 6218]
|
||||
Core was generated by `./coredump -c2'.
|
||||
Program terminated with signal SIGFPE, Arithmetic exception.
|
||||
#0 0x0000000000401233 in zeroDivide () at main.cpp:29
|
||||
29 nRes = 5 / nDivider;
|
||||
(gdb)
|
||||
```
|
||||
|
||||
Type `list` to get a better overview of the source code:
|
||||
|
||||
|
||||
```
|
||||
(gdb) list
|
||||
24 int zeroDivide(){
|
||||
25 int nDivider = 5;
|
||||
26 int nRes = 0;
|
||||
27 while(nDivider > 0){
|
||||
28 nDivider--;
|
||||
29 nRes = 5 / nDivider;
|
||||
30 }
|
||||
31 return nRes;
|
||||
32 }
|
||||
```
|
||||
|
||||
Use the command `info locals` to retrieve the values of the local variables from the point in time when the application failed:
|
||||
|
||||
|
||||
```
|
||||
(gdb) info locals
|
||||
nDivider = 0
|
||||
nRes = 5
|
||||
```
|
||||
|
||||
In combination with the source code, you can see that you ran into a division by zero:
|
||||
|
||||
|
||||
```
|
||||
`nRes = 5 / 0`
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
Knowing how to deal with dump files will help you find and fix hard-to-reproduce random bugs in an application. And if it is not your application, forwarding a core dump to the developer will help her or him find and fix the problem.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/linux-dump
|
||||
|
||||
作者:[Stephan Avenwedde][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/hansic99
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code)
|
||||
[2]: https://en.wikipedia.org/wiki/POSIX
|
||||
[3]: https://man7.org/linux/man-pages/man7/signal.7.html
|
||||
[4]: https://www.gnu.org/software/libc/manual/html_node/Program-Error-Signals.html#Program-Error-Signals
|
||||
[5]: https://en.wikipedia.org/wiki/PDP-11
|
||||
[6]: https://opensource.com/sites/default/files/uploads/dump_written.png (Dump written)
|
||||
[7]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[8]: https://www.gnu.org/software/gdb/
|
||||
[9]: http://www.opengroup.org/onlinepubs/009695399/functions/free.html
|
||||
[10]: https://man7.org/linux/man-pages/man1/coredumpctl.1.html
|
@ -0,0 +1,472 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Use your favorite programming language to provision Infrastructure as Code)
|
||||
[#]: via: (https://opensource.com/article/20/8/infrastructure-as-code-pulumi)
|
||||
[#]: author: (Lee Briggs https://opensource.com/users/lbriggs)
|
||||
|
||||
Use your favorite programming language to provision Infrastructure as Code
|
||||
======
|
||||
Provision everything you need to get your infrastructure off the ground
|
||||
with Node.js or another programming language.
|
||||
![Puzzle pieces coming together to form a computer screen][1]
|
||||
|
||||
As you navigate the world of IT and technology, there are some terms you come across repeatedly. Some of them are hard to quantify and may take on different meanings as time goes on. ["DevOps"][2] is an example of a word that seems (to me) to change depending on the person using it; the original DevOps pioneers might not even recognize what we call DevOps today.
|
||||
|
||||
If you're a software developer, "Infrastructure as Code" (IaC) may be one of those terms. IaC is using the same software-development practices you'd use to write user-facing features to declare the infrastructure that applications run on. This often means using tools like [Git][3] or [Mercurial][4] for version control and Puppet, Chef, or Ansible for [configuration management][5]. At the infrastructure-provisioning layer, the most common technology is CloudFormation (for AWS specifically) or [Terraform][6] as an open source alternative for creating hybrid-cloud resources for your applications to run on.
|
||||
|
||||
There are great options in the configuration-management space to write IaC as either configuration files or preferred programming languages, but this choice is not well-known in the infrastructure-provisioning space.
|
||||
|
||||
[Pulumi][7] offers an option to use standard programming languages to define infrastructure. It supports an array of languages, including [JavaScript][8], [TypeScript][9], [Go][10], [Python][11] and [C#][12]. Much like Terraform, Pulumi has first-class support for many familiar cloud providers, like [AWS][13], [Azure][14], [Google Cloud][15], and [other providers][16].
|
||||
|
||||
In this article, I'll show you how to use Pulumi to write infrastructure in Node.js.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
First, make sure you're ready to use Pulumi. Pulumi supports all major operating systems, so the methods you use to install its prerequisites depend on the operating system you're using.
|
||||
|
||||
First, install the interpreter for your preferred programming language. I'll be using TypeScript, so I need to install the `node` binary. Consult Node's [installation instructions][17] for information about your operating system. You can use [Homebrew][18] on [Mac][19] or [Linux][20] to install:
|
||||
|
||||
|
||||
```
|
||||
`brew install node`
|
||||
```
|
||||
|
||||
On Linux, you can alternately use your usual package manager, such as **apt** or **dnf**:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install nodejs`
|
||||
```
|
||||
|
||||
In either case, the result should be that the `node` binary is available in your `$PATH`. To confirm it's accessible, run:
|
||||
|
||||
|
||||
```
|
||||
`node --version`
|
||||
```
|
||||
|
||||
Next, install the Pulumi command-line interface (CLI). You can find operating system-specific [installation instructions][21] in Pulumi's docs. With `brew` on a Mac or Linux:
|
||||
|
||||
|
||||
```
|
||||
`brew install pulumi`
|
||||
```
|
||||
|
||||
Alternately, you can use the install script. First download it and review it, and then execute it:
|
||||
|
||||
|
||||
```
|
||||
$ curl -fsSL --output pulumi_installer.sh \
|
||||
<https://get.pulumi.com/>
|
||||
$ more pulumi_installer.sh
|
||||
$ sh ./pulumi_installer.sh
|
||||
```
|
||||
|
||||
Again, the desired result is to have the `pulumi` binary available in your path. Check the version to make sure you're ready to proceed:
|
||||
|
||||
|
||||
```
|
||||
pulumi version
|
||||
v2.5.0
|
||||
```
|
||||
|
||||
### Configure Pulumi
|
||||
|
||||
Before you start provisioning any infrastructure, give Pulumi somewhere to store its [state][22].
|
||||
|
||||
Pulumi stores its state in a backend. The default backend is Pulumi's software-as-a-service (which has a free plan for individual users), but for this example, use the alternative file backend. The file backend will create a file on your local filesystem to store the state with:
|
||||
|
||||
|
||||
```
|
||||
`pulumi login --local`
|
||||
```
|
||||
|
||||
If you're planning on sharing this project with someone else, the file backend might not be a good starting point. Pulumi can also store its state in a cloud object store like AWS S3. To use it, create an S3 bucket and log in:
|
||||
|
||||
|
||||
```
|
||||
`pulumi login --cloud-url s3://my-pulumi-state-bucket`
|
||||
```
|
||||
|
||||
Now that you've logged into a state backend, you can create a project and a stack!
|
||||
|
||||
Before you start creating a Pulumi project, get to know the following Pulumi terminology, which you'll see in this tutorial.
|
||||
|
||||
#### Project
|
||||
|
||||
A [project][23] is a directory that contains a Pulumi.yaml file. This file contains metadata Pulumi needs to know to do its thing. Example fields you'll find in a Pulumi.yaml file are:
|
||||
|
||||
* The runtime (e.g., Python, Node, Go, .Net)
|
||||
* A description of the project (e.g., "my first Pulumi project")
|
||||
* A name for the project
|
||||
|
||||
|
||||
|
||||
A project is a loosely defined concept that can fit your needs. Generally, a project contains a bunch of _resources_, which are things you want to provision and control. You might choose to have small Pulumi projects with very few resources or large projects that contain all the resources you need. As you become more familiar with Pulumi, it'll become more apparent how you want to lay out your projects.
|
||||
|
||||
#### Stack
|
||||
|
||||
A Pulumi [stack][24] allows you to differentiate your Pulumi projects depending on configurable values. A common use is to deploy a project to different environments like development or production or different regions like Europe, the Middle East and Africa, and the US.
|
||||
|
||||
When getting started, you're not likely to need a complex stack setup, so this walkthrough uses the default stack name, `dev`.
|
||||
|
||||
### Use TypeScript for IaC
|
||||
|
||||
You can bootstrap a Pulumi project using the handy `pulumi new` command. The `new` command has a whole host of flags and options that should help you get started with Pulumi, so go ahead and create your first project:
|
||||
|
||||
|
||||
```
|
||||
$ pulumi new typescript
|
||||
This command will walk you through creating a new Pulumi project.
|
||||
|
||||
Enter a value or leave blank to accept the (default), and press <ENTER>.
|
||||
Press ^C at any time to quit.
|
||||
|
||||
project name: (pulumi) my-first-project
|
||||
project description: (A minimal TypeScript Pulumi program) My very first Pulumi program
|
||||
Created project 'my-first-project'
|
||||
|
||||
Please enter your desired stack name.
|
||||
To create a stack in an organization, use the format <org-name>/<stack-name> (e.g. `acmecorp/dev`).
|
||||
stack name: (dev) dev
|
||||
Created stack 'dev'
|
||||
|
||||
Installing dependencies...
|
||||
|
||||
> node scripts/postinstall
|
||||
|
||||
added 82 packages from 126 contributors and audited 82 packages in 2.84s
|
||||
|
||||
13 packages are looking for funding
|
||||
run `npm fund` for details
|
||||
|
||||
found 0 vulnerabilities
|
||||
|
||||
Finished installing dependencies
|
||||
|
||||
Your new project is ready to go! ✨
|
||||
|
||||
To perform an initial deployment, run 'pulumi up'
|
||||
```
|
||||
|
||||
A lot happened here, so I'll break it down:
|
||||
|
||||
The first part identifies a template for your Pulumi project. I chose the generic `typescript` option, but there are [many options available][25].
|
||||
|
||||
This `new` command grabbed the template from your templates repository and copied this file locally, including the runtime dependencies (in this case, `package.json`).
|
||||
|
||||
The `new` command took care of installing those dependencies by running `npm install` inside this directory. Then `npm install` downloaded and installed everything needed to run your Pulumi program, which, in this case, is very straightforward: the `@pulumi/pulumi` NPM package.
|
||||
|
||||
You're ready to create your very first resource!
|
||||
|
||||
### Create your first cloud resource
|
||||
|
||||
A resource is a thing that is managed by your infrastructure-provisioning software lifecycle. Resources are generally a cloud provider object, like an S3 bucket. Pulumi providers handle Pulumi resources, and providers are specific to the cloud provider they manage. Pulumi has around [40 providers][26] you can use, but for your first resource, use one of the simplest—the [random provider][27].
|
||||
|
||||
The random provider does what the name suggests: it idempotently creates a random resource (which could be a string, for example) and stores it in the Pulumi state.
|
||||
|
||||
Add this as a dependency to your Pulumi project using npm:
|
||||
|
||||
|
||||
```
|
||||
`npm install @pulumi/random`
|
||||
```
|
||||
|
||||
The npm package manager downloads and installs the random provider package and installs it for you. Now you're ready to write your Pulumi program.
|
||||
|
||||
When you generated your project earlier, Pulumi's bootstrap process created an `index.ts` TypeScript file. Open it in your favorite integrated development environment (IDE) and add your first resource:
|
||||
|
||||
|
||||
```
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
import * as random from "@pulumi/random";
|
||||
|
||||
const password = new random.RandomString(`password`, {
|
||||
length: 10
|
||||
})
|
||||
```
|
||||
|
||||
If you're at all familiar with TypeScript or JavaScript, this will look very familiar because it's written in a programming language you know. This also applies if you're using one of Pulumi's other supported languages. Here's that same random resource from before, but this time in Python:
|
||||
|
||||
|
||||
```
|
||||
import pulumi_random as random
|
||||
|
||||
password = random.RandomString("password", length=10)
|
||||
```
|
||||
|
||||
Pulumi projects currently support only a single language, but each project can reference other projects written in other languages—a useful trick for members of the polyglot team.
|
||||
|
||||
You've written your first Pulumi resource. Now you need to deploy it.
|
||||
|
||||
Leave your editor and head back to the command line. From your project directory, run `pulumi up` and watch the magic happen:
|
||||
|
||||
|
||||
```
|
||||
pulumi up
|
||||
|
||||
Previewing update (dev):
|
||||
Type Name Plan
|
||||
+ pulumi:pulumi:Stack my-first-project-dev create
|
||||
+ └─ random:index:RandomString password create
|
||||
|
||||
Resources:
|
||||
+ 2 to create
|
||||
|
||||
Do you want to perform this update? yes
|
||||
Updating (dev):
|
||||
Type Name Status
|
||||
+ pulumi:pulumi:Stack my-first-project-dev created
|
||||
+ └─ random:index:RandomString password created
|
||||
|
||||
Resources:
|
||||
+ 2 created
|
||||
|
||||
Duration: 2s
|
||||
|
||||
Permalink: file:///Users/lbriggs/.pulumi/stacks/dev.json
|
||||
```
|
||||
|
||||
Excellent, you have your first Pulumi resource! While you might be enjoying this sense of achievement, unfortunately, this random resource isn't that useful—it's just a random string, and you can't even see what it is. Address that part first: Modify your earlier program and add `export` to the constant you created:
|
||||
|
||||
|
||||
```
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
import * as random from "@pulumi/random";
|
||||
|
||||
export const password = new random.RandomString(`password`, {
|
||||
length: 10
|
||||
})
|
||||
```
|
||||
|
||||
Rerun `pulumi up` and look at the output:
|
||||
|
||||
|
||||
```
|
||||
pulumi up
|
||||
Previewing update (dev):
|
||||
Type Name Plan
|
||||
pulumi:pulumi:Stack my-first-project-dev
|
||||
|
||||
Outputs:
|
||||
+ password: {
|
||||
+ id : "&+r?{}J$J7"
|
||||
+ keepers : output<string>
|
||||
+ length : 10
|
||||
+ lower : true
|
||||
+ minLower : 0
|
||||
+ minNumeric : 0
|
||||
+ minSpecial : 0
|
||||
+ minUpper : 0
|
||||
+ number : true
|
||||
+ overrideSpecial: output<string>
|
||||
+ result : "&+r?{}J$J7"
|
||||
+ special : true
|
||||
+ upper : true
|
||||
+ urn : "urn:pulumi:dev::my-first-project::random:index/randomString:RandomString::password"
|
||||
}
|
||||
|
||||
Resources:
|
||||
2 unchanged
|
||||
|
||||
Do you want to perform this update? yes
|
||||
Updating (dev):
|
||||
Type Name Status
|
||||
pulumi:pulumi:Stack my-first-project-dev
|
||||
|
||||
Outputs:
|
||||
+ password: {
|
||||
+ id : "&+r?{}J$J7"
|
||||
+ length : 10
|
||||
+ lower : true
|
||||
+ minLower : 0
|
||||
+ minNumeric: 0
|
||||
+ minSpecial: 0
|
||||
+ minUpper : 0
|
||||
+ number : true
|
||||
+ result : "&+r?{}J$J7"
|
||||
+ special : true
|
||||
+ upper : true
|
||||
+ urn : "urn:pulumi:dev::my-first-project::random:index/randomString:RandomString::password"
|
||||
}
|
||||
|
||||
Resources:
|
||||
2 unchanged
|
||||
|
||||
Duration: 1s
|
||||
Permalink: file:///Users/lbriggs/.pulumi/stacks/dev.json
|
||||
```
|
||||
|
||||
Now you can see a randomly generated string under the `result` section of the `Outputs`. The resource you created has a number of properties that you can see now.
|
||||
|
||||
This is all well and good, but if you want to enjoy IaC, you're going to have to provision something other than a random string. Give it a try!
|
||||
|
||||
### Deploy a container
|
||||
|
||||
So far, you've bootstrapped your Pulumi experience by installing dependencies and registered a simple random resource. Now deploy some actual infrastructure, albeit to your local machine.
|
||||
|
||||
First, add the `@pulumi/docker` provider to your stack. Use your chosen package manager to add it to the project:
|
||||
|
||||
|
||||
```
|
||||
`npm install @pulumi/docker`
|
||||
```
|
||||
|
||||
You've pulled down the Pulumi Docker provider package from npm, which means you can now create Docker images in your project.
|
||||
|
||||
If you don't have Docker installed on your machine, now is an excellent time to get it. Instructions will depend on your operating system, so take a look at [Docker's installation page][28] for information.
|
||||
|
||||
Open up your favorite IDE again and run a Docker container. Modify your `index.ts` file from earlier to make it look like this:
|
||||
|
||||
|
||||
```
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
import * as random from "@pulumi/random";
|
||||
import * as docker from "@pulumi/docker";
|
||||
|
||||
const password = new random.RandomString(`password`, {
|
||||
length: 10
|
||||
})
|
||||
|
||||
const container = new docker.Container(`my-password`, {
|
||||
image: 'hashicorp/http-echo',
|
||||
command: [ pulumi.interpolate`-text=Your super secret password is: ${password.result}` ],
|
||||
ports: [{
|
||||
internal: 5678,
|
||||
external: 5678,
|
||||
}]
|
||||
})
|
||||
|
||||
export const id = container.id
|
||||
```
|
||||
|
||||
This creates a container that creates a web server. The output of the web server is your randomly generated string, in this case, a password. Run this and see what happens:
|
||||
|
||||
|
||||
```
|
||||
pulumi up
|
||||
|
||||
Previewing update (dev):
|
||||
Type Name Plan
|
||||
pulumi:pulumi:Stack my-first-project-dev
|
||||
+ └─ docker:index:Container my-password create
|
||||
|
||||
Outputs:
|
||||
+ id : output<string>
|
||||
~ password: {
|
||||
id : "&+r?{}J$J7"
|
||||
length : 10
|
||||
lower : true
|
||||
minLower : 0
|
||||
minNumeric: 0
|
||||
minSpecial: 0
|
||||
minUpper : 0
|
||||
number : true
|
||||
result : "&+r?{}J$J7"
|
||||
special : true
|
||||
upper : true
|
||||
urn : "urn:pulumi:dev::my-first-project::random:index/randomString:RandomString::password"
|
||||
}
|
||||
|
||||
Resources:
|
||||
+ 1 to create
|
||||
2 unchanged
|
||||
|
||||
Do you want to perform this update? yes
|
||||
Updating (dev):
|
||||
Type Name Status
|
||||
pulumi:pulumi:Stack my-first-project-dev
|
||||
+ └─ docker:index:Container my-password created
|
||||
|
||||
Outputs:
|
||||
+ id : "e73b34aeca34a64b72b61b0b9b8438637ce28853937bc359a1528ca99f49ddda"
|
||||
password: {
|
||||
id : "&+r?{}J$J7"
|
||||
length : 10
|
||||
lower : true
|
||||
minLower : 0
|
||||
minNumeric: 0
|
||||
minSpecial: 0
|
||||
minUpper : 0
|
||||
number : true
|
||||
result : "&+r?{}J$J7"
|
||||
special : true
|
||||
upper : true
|
||||
urn : "urn:pulumi:dev::my-first-project::random:index/randomString:RandomString::password"
|
||||
}
|
||||
|
||||
Resources:
|
||||
+ 1 created
|
||||
2 unchanged
|
||||
|
||||
Duration: 2s
|
||||
Permalink: file:///Users/lbriggs/.pulumi/stacks/dev.json
|
||||
```
|
||||
|
||||
You'll notice in the `Outputs` section that the values you're outputting have changed; it's just a Docker container ID. Check whether your very simple password generator works:
|
||||
|
||||
|
||||
```
|
||||
curl <http://localhost:5678>
|
||||
Your super secret password is: &+r?{}J$J7
|
||||
```
|
||||
|
||||
It does! You just provisioned your first piece of infrastructure with TypeScript!
|
||||
|
||||
#### A quick note on Pulumi outputs
|
||||
|
||||
You'll notice in the code that creates the Docker container that it uses a special `pulumi.interpolate` call. If you're familiar with TypeScript, you might be curious why that's needed (as it's Pulumi-specific). There's an interesting reason.
|
||||
|
||||
When Pulumi creates a resource, there are values that Pulumi doesn't know until the program executes. In Pulumi, these are called `Outputs`. These `Outputs` can be seen in the code above; for example, in your first random resource, you used the `export` keyword to output the random resource's properties, and you also exported the container ID of the container you created.
|
||||
|
||||
Because Pulumi doesn't know the value of these `Outputs` until execution time, it needs special helpers to use them when manipulating strings. If you want to know more about this special programming model, watch [this short video][29].
|
||||
|
||||
### Wrapping up
|
||||
|
||||
IaC has evolved in many ways as complexity has arisen in hybrid-cloud infrastructures. In the infrastructure-provisioning space, Pulumi is a great choice for using your favorite programming language to provision everything you need to get your infrastructure off the ground, then you can tag in your favorite configuration management tooling to take the next steps.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/8/infrastructure-as-code-pulumi
|
||||
|
||||
作者:[Lee Briggs][a]
|
||||
选题:[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/lbriggs
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen)
|
||||
[2]: https://opensource.com/resources/devops
|
||||
[3]: https://git-scm.com/
|
||||
[4]: https://www.mercurial-scm.org/
|
||||
[5]: https://opensource.com/article/18/12/configuration-management-tools
|
||||
[6]: https://opensource.com/article/20/7/terraform-kubernetes
|
||||
[7]: https://www.pulumi.com/
|
||||
[8]: https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||||
[9]: https://www.typescriptlang.org/
|
||||
[10]: https://golang.org/
|
||||
[11]: https://www.python.org/
|
||||
[12]: https://en.wikipedia.org/wiki/C_Sharp_(programming_language)
|
||||
[13]: https://www.pulumi.com/docs/intro/cloud-providers/aws/
|
||||
[14]: https://www.pulumi.com/docs/intro/cloud-providers/azure/
|
||||
[15]: https://www.pulumi.com/docs/intro/cloud-providers/gcp/
|
||||
[16]: https://www.pulumi.com/docs/reference/pkg/
|
||||
[17]: https://nodejs.org/en/download/
|
||||
[18]: https://brew.sh/
|
||||
[19]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[20]: https://opensource.com/article/20/6/homebrew-linux
|
||||
[21]: https://www.pulumi.com/docs/get-started/install/
|
||||
[22]: https://www.pulumi.com/docs/intro/concepts/state/
|
||||
[23]: https://www.pulumi.com/docs/intro/concepts/project/
|
||||
[24]: https://www.pulumi.com/docs/intro/concepts/stack/
|
||||
[25]: https://github.com/pulumi/templates
|
||||
[26]: https://www.pulumi.com/docs/intro/cloud-providers/
|
||||
[27]: https://www.pulumi.com/docs/intro/cloud-providers/random/
|
||||
[28]: https://docs.docker.com/get-docker/
|
||||
[29]: https://www.youtube.com/watch?v=lybOxul2otM
|
@ -0,0 +1,107 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Install Itch on Ubuntu and Other Linux Distributions)
|
||||
[#]: via: (https://itsfoss.com/install-itch-linux/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
How to Install Itch on Ubuntu and Other Linux Distributions
|
||||
======
|
||||
|
||||
[Itch][1] is a platform for independent digital creators with main focus on indie games. It was actually started as website to host, sell and download indie video games but these days, Itch also provides books, comics, tools, board games, soundtracks and more digital content from indie creators.
|
||||
|
||||
As a user, you can download these digital content either for free or for a price set by the creator. All your downloads and purchases are synced to your account so that you can download them whenever you want.
|
||||
|
||||
Consider it like Steam but more focused on indie developers and creators.
|
||||
|
||||
You can browse Itch from its website but Itch also provides and [open source desktop client][2] that gives you some additional advantages. With the desktop client:
|
||||
|
||||
* You can browse games and other content and download them on your system.
|
||||
* The desktop client is automatically updated with all the new features.
|
||||
* Your downloaded games are also automatically updated.
|
||||
* If you play browser-based game on Itch, you can play it offline using the Itch desktop client.
|
||||
|
||||
|
||||
|
||||
In this tutorial, I’ll show you the steps to install Itch on Ubuntu or any other Linux distribution.
|
||||
|
||||
### Installing Itch on Linux desktop
|
||||
|
||||
Itch provides an installer file named itch-setup. You can download this file from its download page.
|
||||
|
||||
[Download Itch for Linux][3]
|
||||
|
||||
This itch-setup file should work on any Linux distribution as long as it has GTK 3 (libgtk-3-0) installed. Most recent Linux distributions should have it.
|
||||
|
||||
Once you download the setup file, right click on it and give it execute permission.
|
||||
|
||||
![Right click and give the file execute permission][4]
|
||||
|
||||
Now run this setup file by double-clicking on it. It will start downloading the latest version of Itch.
|
||||
|
||||
![][5]
|
||||
|
||||
It will take some time depending upon your internet speed. In a few minutes, you should see the this screen asking you to log in to your Itch account.
|
||||
|
||||
![][6]
|
||||
|
||||
Once you are logged in, you can browse games and other contents and download/purchase them.
|
||||
|
||||
![][7]
|
||||
|
||||
The entire installation process is similar to [Steam installation on Ubuntu][8].
|
||||
|
||||
You can find the Itch files in ~/.itch folder. The content you download from Itch usually resides in ~/.config/itch. If you didn’t know, ~ means your home directory.
|
||||
|
||||
### Remove Itch desktop application from your system
|
||||
|
||||
For some reasons, if you do not want to use Itch anymore, you can remove it from your system. For that, unfortunately, you’ll have to use the terminal.
|
||||
|
||||
Open a terminal and use the following command:
|
||||
|
||||
```
|
||||
~/.itch/itch-setup --uninstall
|
||||
```
|
||||
|
||||
It won’t remove your content library. If you want to remove the downloaded games and stuff, you can delete the ~/.config/itch folder manually.
|
||||
|
||||
```
|
||||
rm -r ~/.config/itch
|
||||
```
|
||||
|
||||
**Do you use Itch?**
|
||||
|
||||
Itch is an ethical platform for indie creators and supporters of such models. Itch uses “pay what you want to pay” where the buyer can pay any amount equal or greater than the price set by the content creator.
|
||||
|
||||
Itch also has open revenue sharing model. The creators can share some or no part of their generated revenue with Itch.
|
||||
|
||||
Personally, I prefer such ethical businesses like Itch and Humble Bundle. Like Humble Bundle, Itch also runs sales and bundles from time to time. This helps you save money and support indie developers and creators.
|
||||
|
||||
Do you use Itch or Humble Bundle? Which other similar platform do you use?
|
||||
|
||||
_It’s FOSS is an affiliate partner with Itch. Please read our [affiliate policy][9] for more information._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-itch-linux/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itch.io/?ac=ywUpyBMGXvG
|
||||
[2]: https://github.com/itchio/itch
|
||||
[3]: https://itch.io/app
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-installer-linux.png?ssl=1
|
||||
[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/installing-itch-linux.jpg?ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-running-linux.jpg?ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/itch-game-page.png?resize=800%2C441&ssl=1
|
||||
[8]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[9]: https://itsfoss.com/affiliate-policy/
|
@ -1,131 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (24 Linux desktops you need to try)
|
||||
[#]: via: (https://opensource.com/article/20/5/linux-desktops)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
你需要尝试的 24 个 Linux 桌面环境
|
||||
======
|
||||
一定要抓住它们!
|
||||
![企鹅][1]
|
||||
|
||||
Linux 桌面的最大优点之一是它提供给用户选择的权利。如果你不喜欢你屏幕左下角的应用程序菜单,你可以移除它。如果你不喜欢你的文件管理器处理你的文档的方式,你可以使用一个不同的的文件管理器。不过,不可否认的是,这对那些不习惯自己选择如何使用计算机的用户来说可能会感到迷惑。如果你正在考虑安装 Linux ,你将不得不去做一个你想使用哪一个桌面的选择,最好的方法是:在你找到的一个适合你的桌面前,尝试一些不同的桌面。
|
||||
|
||||
### 默认桌面
|
||||
|
||||
![][2]
|
||||
|
||||
opensource.com
|
||||
|
||||
作为在 Fedora, Ubuntu, Debian, 和一些and several others 上的默认桌面,GNOME 桌面可能是最流行的 Linux 桌面。它有一个易于使用和现代化的界面,毫无疑问适用于移动设备,所以在一个触摸屏上也感觉很自然。
|
||||
|
||||
不过,Linux 的一些发行版选择了不同的东西,包括 KDE Plasma, Pantheon, Cinnamon, 和 Mate 。
|
||||
|
||||
* [GNOME][3]: 现代化和易于使用,默认桌面
|
||||
* [Mate][4]: 传统的 GNOME
|
||||
* [KDE][5]: 功能强大和可配置的 Plasma desktop
|
||||
* [Cinnamon][6]: 经典的 GNOME
|
||||
* [Pantheon][7]: [ElementaryOS][8] 的极美的默认桌面
|
||||
* [Budgie][9]: 一个光线柔和的桌面
|
||||
* [Trinity][10]: 传统的 KDE
|
||||
|
||||
|
||||
|
||||
# 传统的 Unix
|
||||
|
||||
![Window Maker 运行在 Fedora 上][11]
|
||||
|
||||
Unix 是现代操作系统的鼻祖,是 Linux 的直接灵感来源,拥有令人吃惊的丰富的桌面历史。大多数人都不熟悉 Unix 桌面设计,因为 Unix 计算机被认为是学术界、科学界和电影界的普通专用机器,而不是家用计算机。如果你是一名 Unix, IRIX, 或 NeXT 的用户,那么你可能会对类似于 [CDE][12] 或 NeXTStep 的桌面有着美好的回忆。你很幸运,因为这一传统源远流长:
|
||||
|
||||
* [Windowmaker][13]: NeXT 界面复兴
|
||||
* [Enlightenment][14]: 一个现代化的和改善的 Windowmaker 样式的桌面
|
||||
* [Fluxbox][15]: 想法跳出方框
|
||||
* [Openbox][16]: 改善方框的可用性
|
||||
* [TWM][17]: 与 X11 捆绑的永恒的示例桌面
|
||||
* [Fvwm][18]: TWM 的改善
|
||||
|
||||
|
||||
|
||||
### 轻量级桌面
|
||||
|
||||
![XFCE in 2019 年 在 Mageia Linux 上的][19]
|
||||
|
||||
你可能想知道为什么 Linux 有那么多的桌面来从中选择。你可用把很多因素归因于个人喜好和对效率低下的低容忍度,优化一个界面有技术优势来。例如,老电脑使用一个轻量级桌面可用勉力维持跟上用户界面的更新,[这可以赋予它新的生命](<https://opensource.com/article/20/2/macbook-linux-elementary>) 。作为替代方案。你可能仅仅想分配 CPU 周期到除桌面以外的任何东西上,以便使保持你的主用户界面最小化有意义。不管你的动机是什么,这里有一些你可以尝试的桌面:
|
||||
|
||||
* [XFCE][20]: 以很少的性能损失来提供一个熟悉的桌面
|
||||
* [LXQT and LXDE][21]: 以较少的性能损失来提供一个熟悉的桌面
|
||||
* [PekWM][22]: 一个方框样式的窗口管理器
|
||||
* [Joe's Window Manager][23]: 另一个方框样式的窗口管理器
|
||||
* [Ratpoison][24]: 不使用鼠标
|
||||
* [Herbstluftwm][25]: 针对 [Vim 用户][26] 的Ratpoison
|
||||
* [Lumina][27]: 一个为 PC-BSD 开发的桌面
|
||||
|
||||
|
||||
|
||||
### 实验性桌面
|
||||
|
||||
![Unix 桌面环境][28]
|
||||
|
||||
当创建一个桌面并将其集成到一个系统中相对容易的时候,会发生一件你将获得有趣的概念和试验下面的证明的事件。有一些会比其它的更完美无缺,有一些则不是很容易安装。这些很可能注定不会是你永久的桌面,但是它们可以是很有趣的体验:
|
||||
|
||||
* [Unix Desktop Environment][29]: 一个桌面的再创造桌面
|
||||
* [Rox][30]: 在它的时代中是一个先进的和现代的桌面
|
||||
* [MLVWM][31]: 要是 Apple IIe 运行在 Unix 上怎么样?
|
||||
* [Equinox][32]: 仅最基础的东西
|
||||
|
||||
|
||||
|
||||
### 选择你的桌面
|
||||
|
||||
如果你的选择让你不知所措,那么记住:桌面意味着是 _可选择的_ 。你没有义务来尝试发行版附带的多个桌面。
|
||||
|
||||
许多 Linux 的超级用户自己决定他们的发行版的前端的桌面。最重要的事是获取一个可以与你的计算机一起工作的 Linux 系统安装,并花费时间来学习它是如何工作的。归根结底,所有的桌面都注定要做相同的事:帮助你组织和管理你的重要数据。只有你了解了你的桌面是如何工作的,这才是所有最重要的事。但是如果你已经学会了你所需要知道的关于你的默认桌面的一切东西,你现在有大量的选择来在周末尝试。玩得开心!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/5/linux-desktops
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux-penguins.png?itok=yKOpaJM_ (Penguins)
|
||||
[2]: https://opensource.com/sites/default/files/advent-gnome.jpg
|
||||
[3]: https://opensource.com/article/19/12/gnome-linux-desktop
|
||||
[4]: https://opensource.com/article/19/12/mate-linux-desktop
|
||||
[5]: https://opensource.com/article/19/12/linux-kde-plasma
|
||||
[6]: https://opensource.com/article/19/12/cinnamon-linux-desktop
|
||||
[7]: https://opensource.com/article/19/12/pantheon-linux-desktop
|
||||
[8]: https://elementary.io/
|
||||
[9]: https://opensource.com/article/19/12/budgie-linux-desktop
|
||||
[10]: https://opensource.com/article/19/12/linux-trinity-desktop-environment-tde
|
||||
[11]: https://opensource.com/sites/default/files/uploads/advent-windowmaker.jpg (Window Maker running on Fedora)
|
||||
[12]: https://sourceforge.net/projects/cdesktopenv/
|
||||
[13]: https://opensource.com/article/19/12/linux-window-maker-desktop
|
||||
[14]: https://opensource.com/article/19/12/linux-enlightenment-desktop
|
||||
[15]: https://opensource.com/article/19/12/fluxbox-linux-desktop
|
||||
[16]: https://opensource.com/article/19/12/openbox-linux-desktop
|
||||
[17]: https://opensource.com/article/19/12/twm-linux-desktop
|
||||
[18]: https://opensource.com/article/19/12/fvwm-linux-desktop
|
||||
[19]: https://opensource.com/sites/default/files/advent-xfce.jpg (XFCE on Mageia Linux in 2019)
|
||||
[20]: https://opensource.com/article/19/12/xfce-linux-desktop
|
||||
[21]: https://opensource.com/article/19/12/lxqt-lxde-linux-desktop
|
||||
[22]: https://opensource.com/article/19/12/pekwm-linux-desktop
|
||||
[23]: https://opensource.com/article/19/12/joes-window-manager-linux-desktop
|
||||
[24]: https://opensource.com/article/19/12/ratpoison-linux-desktop
|
||||
[25]: https://opensource.com/article/19/12/herbstluftwm-linux-desktop
|
||||
[26]: https://opensource.com/resources/what-vim
|
||||
[27]: https://opensource.com/article/19/12/linux-lumina-desktop
|
||||
[28]: https://opensource.com/sites/default/files/uploads/advent-ude.jpg (Unix Desktop Environment)
|
||||
[29]: https://opensource.com/article/19/12/linux-unix-desktop-environment-ude
|
||||
[30]: https://opensource.com/article/19/12/linux-rox-desktop
|
||||
[31]: https://opensource.com/article/19/12/linux-mlvwm-desktop
|
||||
[32]: https://opensource.com/article/19/12/ede-linux-desktop
|
@ -0,0 +1,74 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (3 reasons to contribute to open source now)
|
||||
[#]: via: (https://opensource.com/article/20/6/why-contribute-open-source)
|
||||
[#]: author: (Jason Blais https://opensource.com/users/jasonblais)
|
||||
|
||||
现在贡献开源的 3 个理由
|
||||
======
|
||||
现在比以往任何时候都更是为开源做出贡献的理想时机。下面是为什么。
|
||||
![Business woman on laptop sitting in front of window][1]
|
||||
|
||||
开源软件已经[遍及世界][2]。从 Linux 和 MySQL 的早期开始,开源就以前所未有的方式推动创新,仅 GitHub 上就有 [180,000 个公共仓库][3]。
|
||||
|
||||
对于尚未进入开源世界的那些人,下面是如今天开始的三个原因。
|
||||
|
||||
### 建立你作为开发人员的信心
|
||||
|
||||
如果你还很年轻,在职业生涯初期,甚至只是在学习一种新的编程语言,那么开源是入门的最佳方法。
|
||||
|
||||
通过参与一个开源项目,你会立即收到有关你的开发和编程技能的反馈。你可能会获得有关如何选择函数名称、条件逻辑的使用方式或如何使用不了解的 goroutine 来加快程序执行速度的建议。这是你在学习新东西时获得的宝贵反馈。
|
||||
|
||||
此外,随着你创建更多的拉取请求并应用从先前提交的内容中学到的知识,你将开始学习如何编写良好的代码并[提交大量拉取请求进行代码审查][4]。最后,许多开源项目提供指导计划,以帮助指导你完成前几个贡献。这是一个非常友好、安全的环境,可树立你作为开发人员的信心。
|
||||
|
||||
有关例子故事,请阅读 [Allan Guwatudde 作为一名自学开发者在开源方面的经验][5]这篇文章。
|
||||
|
||||
### 建立你的简历
|
||||
|
||||
即使你是一位经验丰富的开发人员,你也可能希望简历自己的简历以帮助职业发展和将来的寻找工作。也许你有兴趣探索新的前沿框架或新的编程模块,而你却没有机会在工作中用到。
|
||||
|
||||
你可以通过注册课程或在日常工作中找到一个方式引入这些概念。但是,当这些选项不可用(或不希望使用)时,开源将提供绝佳的机会!除了建立技能和提高信心之外,所有开源贡献都是公开的,它们可以证明你已掌握的技能和已完成的项目。实际上,你的开源个人资料本身可以为你提供强大的作品集,从而使你与其他应聘者脱颖而出。
|
||||
|
||||
此外,许多开源项目,例如 [Mattermost][6],可让你将自己添加为 LinkedIn 的贡献者,以直接提升自己的专业形象。
|
||||
|
||||
[阅读 Siyuan Liu 的旅程][7]这篇文章,了解如何从第一次开源贡献到两次成为 Mattermost 项目 MVP。
|
||||
|
||||
### 建立你的专业网络
|
||||
|
||||
建立强大的专业网络可以帮助你实现职业目标,了解有关你自己或相邻领域的更多信息,并有助于寻找工作。为开源做贡献是建立该网络的绝佳方法。你加入了一个由成百上千的贡献者组成的受欢迎社区,在开源空间中与志趣相投的开发人员进行互动,并一路建立联系。你甚至可能会被介绍给行业中的关键人物,例如知名的开源工具的维护者。这样的关系可以变成改变职业生涯的关系。
|
||||
|
||||
最后,为开源项目做贡献甚至可以让你找到工作!例如,[Mattermost][8] 从它的开源社区聘请了一些贡献者,全职在工程团队中工作。
|
||||
|
||||
### 从今天开始为开源做贡献
|
||||
|
||||
开源让你能够树立开发者的信心,建立简历和建立专业网络。而且,无论你的贡献大小,它都会对开源项目的未来产生直接影响。因此,许多项目都会向贡献者发放礼物以表示感谢(例如,[为所有初次贡献者定制的杯子][9])。
|
||||
|
||||
准备开始进入开源了吗?查看[这些开源项目][10]来进行首次开源贡献,或了解[如何为 Mattermost 做贡献][11]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/6/why-contribute-open-source
|
||||
|
||||
作者:[Jason Blais][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/jasonblais
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating)
|
||||
[2]: https://techcrunch.com/2019/01/12/how-open-source-software-took-over-the-world/
|
||||
[3]: https://github.com/search?q=stars%3A%3E100&s=stars&type=Repositories
|
||||
[4]: https://mattermost.com/blog/submitting-great-prs/
|
||||
[5]: https://mattermost.com/blog/building-confidence-and-gaining-experience-with-good-open-source-projects/
|
||||
[6]: https://docs.mattermost.com/overview/faq.html#can-contributors-add-themselves-to-the-mattermost-company-page-on-linkedin
|
||||
[7]: https://mattermost.com/blog/open-source-contributor-journey-with-mattermost/
|
||||
[8]: https://mattermost.com/careers/
|
||||
[9]: https://forum.mattermost.org/t/limited-edition-mattermost-mugs/143
|
||||
[10]: https://firstcontributions.github.io/
|
||||
[11]: http://mattermost.com/contribute
|
@ -1,64 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (JonnieWayy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Balloon-powered internet service goes live in Kenya)
|
||||
[#]: via: (https://www.networkworld.com/article/3566295/balloon-powered-internet-service-goes-live-in-kenya.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
气球驱动的互联网服务在肯尼亚上线
|
||||
======
|
||||
Alphabet 的衍生产品 [Loon][1] 使用气球创建了一个由蜂窝塔构成的浮动网络。
|
||||
|
||||
ISP [Telkom Kenya][2] 正在启动第一个使用气球的商业化 4G LTE 服务,气球的作用是在漂浮在平流层中作为蜂窝塔网络。
|
||||
|
||||
据 Alphabet 的衍生产品 [Loon][1] 的首席执行官及潜在的技术提供商 Alastair Westgarth 所说,这项服务起初将会覆盖肯尼亚接近 19000 平方英里的范围。 Westgarth 在 [Medium][3] 上的一篇文章中说,将会有大约 35 个或更多的气球组成编队,它们持续不断地移动,漂浮在地表上方大约 12 英里的平流层中。“我们将 Loon 称为浮动的蜂窝塔网络。” Westgarth 说道。
|
||||
|
||||
Telkom Kenya 的首席执行官 Mugo Kibati 在一篇[新闻稿][4]中提到,传统互联网对肯尼亚的服务不足,这是采用这种输送装置的原因。“…… 具有互联网功能的气球能够为生活在服务不足或是完全没有服务的偏远地区的许多肯尼亚人提供联系,因此仍然处于不利低位。” Kibati 说道。远程医疗和在线教育是两个预期的用例。
|
||||
|
||||
在测试中, Loon 实现了 有 19 毫秒延迟的 18.9 Mbps 下行速度,以及 4.74 Mbps 的上行速度。 Westgarth 说,该服务能够用于“语音通话、视频通话、 YouTube、 WhatsApp、电子邮件、发短信、网页浏览”和其他应用程序。
|
||||
|
||||
从更大的角度看,从平流层提供互联网服务对于[物联网( IoT )][5]来说是一个诱人的主张。在高海拔地区,网络覆盖范围可能会更广泛,并且覆盖范围可以随着需求的变化而变化(例如,采矿区的移动)。此外,要建立或处理的地面基础设施更少。 比方说,开发人员可以避免铺设电缆所需的私有财产纠纷。
|
||||
|
||||
可以想象,服务中断也更加可控。提供商可以启动另一台设备,而不必通过复杂的远程地面基础设施来跟踪故障。备用气球可以发挥作用,时刻准备着投入使用。
|
||||
|
||||
### 基于无人机的互联网交付
|
||||
|
||||
另一家正在探索大气层互联网的组织是软银( Softbank ),它称其 260 英尺宽的 HAWK30 无人机是“平流层中的浮动基站”。(参见相关故事:[软银计划到 2023 年实现无人机交付的物联网和互联网][6])
|
||||
|
||||
日本主要的电信公司对平流层传送的互联网感兴趣的原因之一是,其群岛易于发生自然灾害,例如地震。与传统的基站相比,地球上空的浮动基站更容易移动,从而可以更快、更灵活地应对自然灾害。
|
||||
|
||||
实际上,在一场灾害过后, Loon 的气球已成功用于提供互联网服务:例如, Loon 在 2017 年波多黎各的飓风 Maria 之后提供了连接。
|
||||
|
||||
Westgarth 说, Loon 的气球自最初开发以来已经走了很长一段路。现如今,发射是通过自动设备执行的,该设备可以每半小时将连接在地面站点的气球推到 60000 英尺高空,而不像以前那样人工进行。
|
||||
|
||||
机器学习算法会处理导航,以尝试向用户提供持续的服务。但是,这并非总是可能的,因为风(尽管在地面上没有那么大)和受限的空域都会影响覆盖范围,尽管 Westgarth 称之为“精心编排组织的气球舞蹈”。
|
||||
|
||||
此外,这些设备是太阳能供电的,这意味着它们仅仅能够在白天工作并提供互联网(或重新定位自身,或向其他气球传输互联网)。出于上述原因和其他的一些原因, Westgarth 和 Kibati 指出,气球必须扩大现有的基础设施和计划,但这并不是一个完整的解决方案。
|
||||
|
||||
Westgarth 说:“为了连接现在和将来需要它的所有人员和事物,我们需要开阔我们的思维;我们需要在连通性生态系统中增加新的一层。”
|
||||
|
||||
加入 [Facebook][7] 和 [LinkedIn][8] 上的 Network World 社区,以评论最首要的主题。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3566295/balloon-powered-internet-service-goes-live-in-kenya.html
|
||||
|
||||
作者:[Patrick Nelson][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[JonnieWayy](https://github.com/JonnieWayy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Patrick-Nelson/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://loon.com/
|
||||
[2]: https://www.telkom.co.ke/
|
||||
[3]: https://medium.com/loon-for-all/loon-is-live-in-kenya-259d81c75a7a
|
||||
[4]: https://telkom.co.ke/telkom-and-loon-announce-progressive-deployment-loon-technology-customers-july
|
||||
[5]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
|
||||
[6]: https://www.networkworld.com/article/3405170/softbank-plans-drone-delivered-iot-and-internet-by-2023.html
|
||||
[7]: https://www.facebook.com/NetworkWorld/
|
||||
[8]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,89 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Bypass your Linux firewall with SSH over HTTP)
|
||||
[#]: via: (https://opensource.com/article/20/7/linux-shellhub)
|
||||
[#]: author: (Domarys https://opensource.com/users/domarys)
|
||||
|
||||
通过 SSH over HTTP 绕过 Linux 防火墙
|
||||
======
|
||||
需要远程工作的看一下。使用这个有帮助的开源解决方案在任何地方快速地连接和访问你的所有设备。
|
||||
![Terminal command prompt on orange background][1]
|
||||
|
||||
随着连接速度和远程作业需求的增长,访问远程计算资源变得越来越重要。但是,提供对设备和硬件的外部访问的要求使此任务变得复杂而有风险。为了减少这些冲突,[ShellHub][2] 是一个云服务器,它可以从任何外部网络访问这些设备。
|
||||
|
||||
ShellHub 是一个 Apache 2.0 许可的开源解决方案,它可满足所有这些需求,并允许用户通过一个帐户连接和管理多个设备。它开发是为了方便开发人员和程序员的任务,使任何硬件架构都能够远程访问 Linux 设备。
|
||||
|
||||
仔细观察,ShellHub 方案使用 HTTP 传输层来封装 SSH 协议。这种传输层选择可以在大多数网络上无缝使用,因为大多数公司的防火墙规则和策略通常都可以使用并接受它。
|
||||
|
||||
这些示例使用 2020 年 6 月 10 日发布的 ShellHub 版本 0.3.2。
|
||||
|
||||
### 使用 ShellHub
|
||||
|
||||
要访问该平台,只需进入 [shellhub.io][3] 并注册一个自己的帐户。你的注册数据将帮助开发团队了解用户资料并提供有关如何改进平台的更多信息。
|
||||
|
||||
![ShellHub registration form][4]
|
||||
|
||||
图 1:[shellhub.io][5] 中的注册表格
|
||||
|
||||
ShellHub 有直观、简洁的界面,这让所有的信息和功能都能以最快的方式呈现。注册后,你会看到一块仪表板,这时可以注册你的第一台设备。
|
||||
|
||||
### 添加设备
|
||||
|
||||
要通过 ShellHub 启用设备连接,你需要生成一个标识符,它用于在设备连接到服务器时对你的设备进行身份验证。
|
||||
|
||||
此标识必须在将与镜像一起保存在设备的代理(ShellHub 客户端)内进行配置,或者必须添加为 Docker 容器。
|
||||
|
||||
ShellHub 默认使用 Docker 运行代理,这非常方便,因为它在现有系统上提供了一种无痛的添加方式,支持 Docker 是唯一的要求。要添加设备,你需要粘贴命令行,它显示在 ShellHub Cloud 的对话框中(请参见图 2)。
|
||||
|
||||
![Figure 2: Adding a device to the ShellHub Cloud][6]
|
||||
图 2:将设备添加到 ShellHub Cloud
|
||||
|
||||
设备默认使用它的 MAC 地址作为其主机名。在内部,该设备由其密钥标识,这是在设备注册期间生成的,用于与服务器进行身份验证。
|
||||
|
||||
### 访问设备
|
||||
|
||||
要访问你的设备,只需进入仪表板中的“查看所有设备”,或单击左侧菜单上的“设备”。这将列出你所有已注册的设备。
|
||||
|
||||
设备状态可在页面上轻松看到。在线设备旁边会显示一个绿色图标,可以单击终端图标进行连接。你接着输入密码,最后单击”连接“按钮,请参见(图 3)。
|
||||
|
||||
![Figure 3: Accessing a device using the terminal on the web][7]
|
||||
图 3:使用网络上的终端访问设备
|
||||
|
||||
另一种访问设备的方法是从类似 [PuTTY][8]、[Termius][9] 之类的 SSH 客户端,甚至 Linux 终端访问。我们可以使用称为 SSHID 的 ShellHub 标识作为连接的目的地址(例如 ssh ssh [username@SSHID][10])。图 4 说明了如何使用在终端中使用 Linux SSH 客户端连接到我们的计算机。
|
||||
|
||||
![Figure 4: Connecting to a device using the Linux terminal][11]
|
||||
图 4:使用 Linux 终端连接到设备
|
||||
|
||||
无论你何时登录 ShellHub Cloud 平台,你都可以访问仪表板上的所有已注册设备,这样你可以随时随地访问它们。ShellHub 简化了通过开源平台以透明方式与远程计算机保持通信安全的过程。
|
||||
|
||||
在 [GitHub][2] 上加入 ShellHub 社区,或随时通过 [Gitter][12] 或通过电子邮件 [contato@ossystems.com.br][13] 向开发团队发送你的建议或反馈。我们很乐意收到社区成员的贡献!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/7/linux-shellhub
|
||||
|
||||
作者:[Domarys][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/domarys
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background)
|
||||
[2]: https://github.com/shellhub-io/shellhub
|
||||
[3]: https://www.shellhub.io/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/shellhub_registration_form_0.png (ShellHub registration form)
|
||||
[5]: https://opensource.com/article/20/7/www.shellhub.io
|
||||
[6]: https://opensource.com/sites/default/files/figure2.gif
|
||||
[7]: https://opensource.com/sites/default/files/figure3.gif
|
||||
[8]: https://www.putty.org/
|
||||
[9]: https://termius.com/
|
||||
[10]: mailto:username@SSHID
|
||||
[11]: https://opensource.com/sites/default/files/figure4.gif
|
||||
[12]: https://gitter.im/shellhub-io/community?at=5e39ad8b3aca1e4c5f633e8f
|
||||
[13]: mailto:contato@ossystems.com.br
|
Loading…
Reference in New Issue
Block a user