diff --git a/published/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md b/published/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md new file mode 100644 index 0000000000..67a78ae96f --- /dev/null +++ b/published/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md @@ -0,0 +1,110 @@ +Ubuntu 的 Snap、Red Hat 的 Flatpak 这种通吃所有发行版的打包方式真的有用吗? +================================================================================= + +![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/06/Flatpak-and-Snap-Packages.jpg) + +**对新一代的打包格式开始渗透到 Linux 生态系统中的深入观察** + +最近我们听到越来越多的有关于 Ubuntu 的 Snap 包和由 Red Hat 员工 Alexander Larsson 创造的 Flatpak (曾经叫做 xdg-app)的消息。 + +这两种下一代打包方法在本质上拥有相同的目标和特点:即不依赖于第三方系统功能库的独立包装。 + +这种 Linux 新技术方向似乎自然会让人脑海中浮现这样的问题:独立包的优点/缺点是什么?这是否让我们拥有更好的 Linux 系统?其背后的动机是什么? + +为了回答这些问题,让我们先深入了解一下 Snap 和 Flatpak。 + +### 动机 + +根据 [Flatpak][1] 和 [Snap][2] 的声明,背后的主要动机是使同一版本的应用程序能够运行在多个 Linux 发行版。 + +> “从一开始它的主要目标是允许相同的应用程序运行在各种 Linux 发行版和操作系统上。” —— Flatpak + +> “……‘snap’ 通用 Linux 包格式,使简单的二进制包能够完美的、安全的运行在任何 Linux 桌面、服务器、云和设备上。” —— Snap + +说得更具体一点,站在 Snap 和 Flatpak (以下称之为 S&F)背后的人认为,Linux 平台存在碎片化的问题。 + +这个问题导致了开发者们需要做许多不必要的工作来使他的软件能够运行在各种不同的发行版上,这影响了整个平台的前进。 + +所以,作为 Linux 发行版(Ubuntu 和 Red Hat)的领导者,他们希望消除这个障碍,推动平台发展。 + +但是,是否是更多的个人收益刺激了 S&F 的开发? + +#### 个人收益? + +虽然没有任何官方声明,但是试想一下,如果能够创造这种可能会被大多数发行版(即便不是全部)所采用的打包方式,那么这个项目的领导者将可能成为一个能够决定 Linux 大船航向的重要人物。 + +### 优势 + +这种独立包的好处多多,并且取决于不同的因素。 + +这些因素基本上可以归为两类: + +#### 用户角度 + +**+** 从 Liunx 用户的观点来看:Snap 和 Flatpak 带来了将任何软件包(软件或应用)安装在用户使用的任何发行版上的可能性。 + +例如你在使用一个不是很流行的发行版,由于开发工作的缺乏,它的软件仓库只有很稀少的包。现在,通过 S&F 你就可以显著的增加包的数量,这是一个多么美好的事情。 + +**+** 同样,对于使用流行的发行版的用户,即使该发行版的软件仓库上有很多的包,他也可以在不改变它现有的功能库的同时安装一个新的包。 + +比方说, 一个 Debian 的用户想要安装一个 “测试分支” 的包,但是他又不想将他的整个系统变成测试版(来让该包运行在更新的功能库上)。现在,他就可以简单的想安装哪个版本就安装哪个版本,而不需要考虑库的问题。 + +对于持后者观点的人,可能基本上都是使用源文件编译他们的包的人,然而,除非你使用类似 Gentoo 这样基于源代码的发行版,否则大多数用户将从头编译视为是一个恶心到吐的事情。 + +**+** 高级用户,或者称之为 “拥有安全意识的用户” 可能会觉得更容易接受这种类型的包,只要它们来自可靠来源,这种包倾向于提供另一层隔离,因为它们通常是与系统包想隔离的。 + +\* 不论是 Snap 还是 Flatpak 都在不断努力增强它们的安全性,通常他们都使用 “沙盒化” 来隔离,以防止它们可能携带病毒感染整个系统,就像微软 Windows 系统中的 .exe 程序一样。(关于微软和 S&F 后面还会谈到) + +#### 开发者角度 + +与普通用户相比,对于开发者来说,开发 S&F 包的优点可能更加清楚。这一点已经在上一节有所提示。 + +尽管如此,这些优点有: + +**+** S&F 通过统一开发的过程,将多发行版的开发变得简单了起来。对于需要将他的应用运行在多个发行版的开发者来说,这大大的减少了他们的工作量。 + +**++** 因此,开发者能够更容易的使他的应用运行在更多的发行版上。 + +**+** S&F 允许开发者私自发布他的包,不需要依靠发行版维护者在每一个/每一次发行版中发布他的包。 + +**++** 通过上述方法,开发者可以不依赖发行版而直接获取到用户安装和卸载其软件的统计数据。 + +**++** 同样是通过上述方法,开发者可以更好的直接与用户互动,而不需要通过中间媒介,比如发行版这种中间媒介。 + +### 缺点 + +**–** 膨胀。就是这么简单。Flatpak 和 Snap 并不是凭空变出来它的依赖关系。相反,它是通过将依赖关系预构建在其中来代替使用系统中的依赖关系。 + +就像谚语说的:“山不来就我,我就去就山”。 + +**–** 之前提到安全意识强的用户会喜欢 S&F 提供的额外的一层隔离,只要该应用来自一个受信任的来源。但是从另外一个角度看,对这方面了解较少的用户,可能会从一个不靠谱的地方弄来一个包含恶意软件的包从而导致危害。 + +上面提到的观点可以说是有很有意义的,虽说今天的流行方法,像 PPA、overlay 等也可能是来自不受信任的来源。 + +但是,S&F 包更加增加这个风险,因为恶意软件开发者只需要开发一个版本就可以感染各种发行版。相反,如果没有 S&F,恶意软件的开发者就需要创建不同的版本以适应不同的发行版。 + +### 原来微软一直是正确的吗? + +考虑到上面提到的,很显然,在大多数情况下,使用 S&F 包的优点超过缺点。 + +至少对于二进制发行版的用户,或者重点不是轻量级的发行版的用户来说是这样的。 + +这促使我问出这个问题,可能微软一直是正确的吗?如果是的,那么当 S&F 变成 Linux 的标准后,你还会一如既往的使用 Linux 或者类 Unix 系统吗? + +很显然,时间会是这个问题的最好答案。 + +不过,我认为,即使不完全正确,但是微软有些地方也是值得赞扬的,并且以我的观点来看,所有这些方式在 Linux 上都立马能用也确实是一个亮点。 + +-------------------------------------------------------------------------------- + +via: http://www.iwillfolo.com/ubuntus-snap-red-hats-flatpack-and-is-one-fits-all-linux-packages-useful/ + +作者:[Editorials][a] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.iwillfolo.com/category/editorials/ +[1]: http://flatpak.org/press/2016-06-21-flatpak-released.html +[2]: https://insights.ubuntu.com/2016/06/14/universal-snap-packages-launch-on-multiple-linux-distros diff --git a/translated/tech/20160815 Alternative System Monitor Applet For LXDE Xfce And MATE - Multiload-ng.md b/published/20160815 Alternative System Monitor Applet For LXDE Xfce And MATE - Multiload-ng.md similarity index 80% rename from translated/tech/20160815 Alternative System Monitor Applet For LXDE Xfce And MATE - Multiload-ng.md rename to published/20160815 Alternative System Monitor Applet For LXDE Xfce And MATE - Multiload-ng.md index 1c68316953..55e867dd46 100644 --- a/translated/tech/20160815 Alternative System Monitor Applet For LXDE Xfce And MATE - Multiload-ng.md +++ b/published/20160815 Alternative System Monitor Applet For LXDE Xfce And MATE - Multiload-ng.md @@ -7,7 +7,7 @@ LXDE、Xfce 及 MATE 桌面环境下的又一系统监视器应用:Multiload-n Multiload-ng 的特点有: -- 支持图形化: CPU,内存,网络,交换空间,平均负载,磁盘以及温度; +- 支持以下资源的图形块: CPU,内存,网络,交换空间,平均负载,磁盘以及温度; - 高度可定制; - 支持配色方案; - 自动适应容器(面板或窗口)的改变; @@ -15,7 +15,7 @@ Multiload-ng 的特点有: - 提供基本或详细的提示信息; - 可自定义双击触发的动作。 -相比于原来的 Multiload 应用,Multiload-ng 含有一个额外的图形块(温度),更多独立的图形自定义选项,例如独立的边框颜色,支持配色方案,可根据自定义的动作对鼠标的点击做出反应,图形块的方向可以被设定为与面板的方向无关。 +相比于原来的 Multiload 应用,Multiload-ng 含有一个额外的图形块(温度),以及更多独立的图形自定义选项,例如独立的边框颜色,支持配色方案,可根据自定义的动作对鼠标的点击做出反应,图形块的方向可以被设定为与面板的方向无关。 它也可以运行在一个独立的窗口中,而不需要面板: @@ -29,15 +29,15 @@ Multiload-ng 的特点有: ![](https://1.bp.blogspot.com/-WAD5MdDObD8/V7GixgVU0DI/AAAAAAAAYS8/uMhHJri1GJccRWvmf_tZkYeenVdxiENQwCLcB/s400/multiload-ng-xfce-vertical.png) -这个应用的偏好设置窗口虽然不是非常好看,但有很多方式去改进它: +这个应用的偏好设置窗口虽然不是非常好看,但是有计划去改进它: ![](https://2.bp.blogspot.com/-P-ophDpc-gI/V7Gi_54b7JI/AAAAAAAAYTA/AHQck_JF_RcwZ1KbgHbaO2JRt24ZZdO3gCLcB/s320/multiload-ng-preferences.png) Multiload-ng 当前使用的是 GTK2,所以它不能在构建自 GTK3 下的 Xfce 或 MATE 桌面环境(面板)下工作。 -对于 Ubuntu 系统而言,只有 Ubuntu MATE 16.10 使用 GTK3。但是鉴于 MATE 的系统监视器应用也是 Multiload GNOME 的一个分支,所以它们共享大多数的特点(除了 Multiload-ng 提供的额外自定义选项和温度图形块)。 +对于 Ubuntu 系统而言,只有 Ubuntu MATE 16.10 使用 GTK3。但是鉴于 MATE 的系统监视器应用也是 Multiload GNOME 的一个分支,所以它们大多数的功能相同(除了 Multiload-ng 提供的额外自定义选项和温度图形块)。 -该应用的 [愿望清单][2] 中提及到了计划支持 GTK3 的集成以及各种各样的改进,例如温度块资料的更多来源,能够显示十进制(KB, MB, GB...)或二进制(KiB, MiB, GiB...)单位等等。 +该应用的[愿望清单][2] 中提及到了计划支持 GTK3 的集成以及各种各样的改进,例如温度块资料的更多来源,能够显示十进制(KB、MB、GB……)或二进制(KiB、MiB、GiB……)单位等等。 ### 安装 Multiload-ng @@ -76,7 +76,7 @@ sudo apt install mate-multiload-ng-applet sudo apt install multiload-ng-standalone ``` -一旦安装完毕,便可以像其他应用那样添加到桌面面板中了。需要注意的是在 LXDE 中,Multiload-ng 不能马上出现在面板清单中,除非面板被重新启动。你可以通过重启会话(登出后再登录)或者使用下面的命令来重启面板: +一旦安装完毕,便可以像其他应用那样添加到桌面面板中了。需要注意的是在 LXDE 中,Multiload-ng 不能马上出现在面板清单中,除非重新启动面板。你可以通过重启会话(登出后再登录)或者使用下面的命令来重启面板: ``` lxpanelctl restart @@ -85,13 +85,14 @@ lxpanelctl restart 独立的 Multiload-ng 应用可以像其他正常应用那样从菜单中启动。 如果要下载源码或报告 bug 等,请看 Multiload-ng 的 [GitHub page][3]。 + -------------------------------------------------------------------------------- via: http://www.webupd8.org/2016/08/alternative-system-monitor-applet-for.html 作者:[Andrew][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md b/sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md deleted file mode 100644 index 78c6cbaecf..0000000000 --- a/sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md +++ /dev/null @@ -1,84 +0,0 @@ -LinuxBars translating - -Torvalds 2.0: Patricia Torvalds on computing, college, feminism, and increasing diversity in tech -================================================================================ - -![Image by : Photo by Becky Svartström. Modified by Opensource.com. CC BY-SA 4.0](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-lead-patriciatorvalds.png) -Image by : Photo by Becky Svartström. Modified by Opensource.com. [CC BY-SA 4.0][1] - -Patricia Torvalds isn't the Torvalds name that pops up in Linux and open source circles. Yet. - -![](http://opensource.com/sites/default/files/images/life-uploads/ptorvalds.png) - -At 18, Patricia is a feminist with a growing list of tech achievements, open source industry experience, and her sights set on diving into her freshman year of college at Duke University's Pratt School of Engineering. She works for [Puppet Labs][2] in Portland, Oregon, as an intern, but soon she'll head to Durham, North Carolina, to start the fall semester of college. - -In this exclusive interview, Patricia explains what got her interested in computer science and engineering (spoiler alert: it wasn't her father), what her high school did "right" with teaching tech, the important role feminism plays in her life, and her thoughts on the lack of diversity in technology. - -![](http://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) - -### What made you interested in studying computer science and engineering? ### - -My interest in tech really grew throughout high school. I wanted to go into biology for a while, until around my sophomore year. I had a web design internship at the Portland VA after my sophomore year. And I took an engineering class called Exploratory Ventures, which sent an ROV into the Pacific ocean late in my sophomore year, but the turning point was probably when I was named a regional winner and national runner up for the [NCWIT Aspirations in Computing][3] award halfway through my junior year. - -The award made me feel validated in my interest, of course, but I think the most important part of it was getting to join a Facebook group for all the award winners. The girls who have won the award are absolutely incredible and so supportive of each other. I was definitely interested in computer science before I won the award, because of my work in XV and at the VA, but having these girls to talk to solidified my interest and has kept it really strong. Teaching XV—more on that later—my junior and senior year, also, made engineering and computer science really fun for me. - -### What do you plan to study? And do you already know what you want to do after college? ### - -I hope to major in either Mechanical or Electrical and Computer Engineering as well as Computer Science, and minor in Women's Studies. After college, I hope to work for a company that supports or creates technology for social good, or start my own company. - -### My daughter had one high school programming class—Visual Basic. She was the only girl in her class, and she ended up getting harassed and having a miserable experience. What was your experience like? ### - -My high school began offering computer science classes my senior year, and I took Visual Basic as well! The class wasn't bad, but I was definitely one of three or four girls in the class of 20 or so students. Other computing classes seemed to have similar gender breakdowns. However, my high school was extremely small and the teacher was supportive of inclusivity in tech, so there was no harassment that I noticed. Hopefully the classes become more diverse in future years. - -### What did your schools do right technology-wise? And how could they have been better? ### - -My high school gave us consistent access to computers, and teachers occasionally assigned technology-based assignments in unrelated classes—we had to create a website for a social studies class a few times—which I think is great because it exposes everyone to tech. The robotics club was also pretty active and well-funded, but fairly small; I was not a member. One very strong component of the school's technology/engineering program is actually a student-taught engineering class called Exploratory Ventures, which is a hands-on class that tackles a new engineering or computer science problem every year. I taught it for two years with a classmate of mine, and have had students come up to me and tell me they're interested in pursuing engineering or computer science as a result of the class. - -However, my high school was not particularly focused on deliberately including young women in these programs, and it isn't very racially diverse. The computing-based classes and clubs were, by a vast majority, filled with white male students. This could definitely be improved on. - -### Growing up, how did you use technology at home? ### - -Honestly, when I was younger I used my computer time (my dad created a tracker, which logged us off after an hour of Internet use) to play Neopets or similar games. I guess I could have tried to mess with the tracker or played on the computer without Internet use, but I just didn't. I sometimes did little science projects with my dad, and I remember once printing "Hello world" in the terminal with him a thousand times, but mostly I just played online games with my sisters and didn't get my start in computing until high school. - -### You were active in the Feminism Club at your high school. What did you learn from that experience? What feminist issues are most important to you now? ### - -My friend and I co-founded Feminism Club at our high school late in our sophomore year. We did receive lots of resistance to the club at first, and while that never entirely went away, by the time we graduated feminist ideals were absolutely a part of the school's culture. The feminist work we did at my high school was generally on a more immediate scale and focused on issues like the dress code. - -Personally, I'm very focused on intersectional feminism, which is feminism as it applies to other aspects of oppression like racism and classism. The Facebook page [Guerrilla Feminism][4] is a great example of an intersectional feminism and has done so much to educate me. I currently run the Portland branch. - -Feminism is also important to me in terms of diversity in tech, although as an upper-class white woman with strong connections in the tech world, the problems here affect me much less than they do other people. The same goes for my involvement in intersectional feminism. Publications like [Model View Culture][5] are very inspiring to me, and I admire Shanley Kane so much for what she does. - -### What advice would you give parents who want to teach their children how to program? ### - -Honestly, nobody ever pushed me into computer science or engineering. Like I said, for a long time I wanted to be a geneticist. I got a summer internship doing web design for the VA the summer after my sophomore year and totally changed my mind. So I don't know if I can fully answer that question. - -I do think genuine interest is important, though. If my dad had sat me down in front of the computer and told me to configure a webserver when I was 12, I don't think I'd be interested in computer science. Instead, my parents gave me a lot of free reign to do what I wanted, which was mostly coding terrible little HTML sites for my Neopets. Neither of my younger sisters are interested in engineering or computer science, and my parents don't care. I'm really lucky my parents have given me and my sisters the encouragement and resources to explore our interests. - -Still, I grew up saying my future career would be "like my dad's"—even when I didn't know what he did. He has a pretty cool job. Also, one time when I was in middle school, I told him that and he got a little choked up and said I wouldn't think that in high school. So I guess that motivated me a bit. - -### What suggestions do you have for leaders in open source communities to help them attract and maintain a more diverse mix of contributors? ### - -I'm actually not active in particular open source communities. I feel much more comfortable discussing computing with other women; I'm a member of the [NCWIT Aspirations in Computing][6] network and it's been one of the most important aspects of my continued interest in technology, as well as the Facebook group [Ladies Storm Hackathons][7]. - -I think this applies well to attracting and maintaining a talented and diverse mix of contributors: Safe spaces are important. I have seen the misogynistic and racist comments made in some open source communities, and subsequent dismissals when people point out the issues. I think that in maintaining a professional community there have to be strong standards on what constitutes harassment or inappropriate conduct. Of course, people can—and will—have a variety of opinions on what they should be able to express in open source communities, or any community. However, if community leaders actually want to attract and maintain diverse talent, they need to create a safe space and hold community members to high standards. - -I also think that some community leaders just don't value diversity. It's really easy to argue that tech is a meritocracy, and the reason there are so few marginalized people in tech is just that they aren't interested, and that the problem comes from earlier on in the pipeline. They argue that if someone is good enough at their job, their gender or race or sexual orientation doesn't matter. That's the easy argument. But I was raised not to make excuses for mistakes. And I think the lack of diversity is a mistake, and that we should be taking responsibility for it and actively trying to make it better. - --------------------------------------------------------------------------------- - -via: http://opensource.com/life/15/8/patricia-torvalds-interview - -作者:[Rikki Endsley][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/rikki-endsley -[1]:https://creativecommons.org/licenses/by-sa/4.0/ -[2]:https://puppetlabs.com/ -[3]:https://www.aspirations.org/ -[4]:https://www.facebook.com/guerrillafeminism -[5]:https://modelviewculture.com/ -[6]:https://www.aspirations.org/ -[7]:https://www.facebook.com/groups/LadiesStormHackathons/ diff --git a/sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md b/sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md deleted file mode 100644 index b1c955bf5b..0000000000 --- a/sources/talk/20160625 Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful.md +++ /dev/null @@ -1,112 +0,0 @@ -Translating by Chao-zhi - -Ubuntu’s Snap, Red Hat’s Flatpak And Is ‘One Fits All’ Linux Packages Useful? -================================================================================= - -![](http://www.iwillfolo.com/wordpress/wp-content/uploads/2016/06/Flatpak-and-Snap-Packages.jpg) - -An in-depth look into the new generation of packages starting to permeate the Linux ecosystem. - - -Lately we’ve been hearing more and more about Ubuntu’s Snap packages and Flatpak (formerly referred to as xdg-app) created by Red Hat’s employee Alexander Larsson. - -These 2 types of next generation packages are in essence having the same goal and characteristics which are: being standalone packages that doesn’t rely on 3rd-party system libraries in order to function. - -This new technology direction which Linux seems to be headed is automatically giving rise to questions such as, what are the advantages / disadvantages of standalone packages? does this lead us to a better Linux overall? what are the motives behind it? - -To answer these questions and more, let us explore the things we know about Snap and Flatpak so far. - -### The Motive - -According to both [Flatpak][1] and [Snap][2] statements, the main motive behind them is to be able to bring one and the same version of application to run across multiple Linux distributions. - ->“From the very start its primary goal has been to allow the same application to run across a myriad of Linux distributions and operating systems.” Flatpak - ->“… ‘snap’ universal Linux package format, enabling a single binary package to work perfectly and securely on any Linux desktop, server, cloud or device.” Snap - -To be more specific, the guys behind Snap and Flatpak (S&F) believe that there’s a barrier of fragmentation on the Linux platform. - -A barrier which holds back the platform advancement by burdening developers with more, perhaps unnecessary, work to get their software run on the many distributions out there. - -Therefore, as leading Linux distributions (Ubuntu & Red Hat), they wish to eliminate the barrier and strengthen the platform in general. - -But what are the more personal gains which motivate the development of S&F? - -#### Personal Gains? - -Although not officially stated anywhere, it may be assumed that by leading the efforts of creating a unified package that could potentially be adopted by the vast majority of Linux distros (if not all of them), the captains of these projects could assume a key position in determining where the Linux ship sails. - -### The Advantages - -The benefits of standalone packages are diverse and can depend on different factors. - -Basically however, these factors can be categorized under 2 distinct criteria: - -#### User Perspective - -+ From a Linux user point of view, Snap and Flatpak both bring the possibility of installing any package (software / app) on any distribution the user is using. - -That is, for instance, if you’re using a not so popular distribution which has only a scarce supply of packages available in their repo, due to workforce limitations probably, you’ll now be able to easily and significantly increase the amount of packages available to you – which is a great thing. - -+ Also, users of popular distributions that do have many packages available in their repos, will enjoy the ability of installing packages that might not have behaved with their current set of installed libraries. - -For example, a Debian user who wants to install a package from ‘testing branch’ will not have to convert his entire system into ‘testing’ (in order for the package to run against newer libraries), rather, that user will simply be able to install only the package he wants from whichever branch he likes and on whatever branch he’s on. - -The latter point, was already basically possible for users who were compiling their packages straight from source, however, unless using a source based distribution such as Gentoo, most users will see this as just an unworthily hassle. - -+ The advanced user, or perhaps better put, the security aware user might feel more comfortable with this type of packages as long as they come from a reliable source as they tend to provide another layer of isolation since they are generally isolated from system packages. - -* Both S&F are being developed with enhanced security in mind, which generally makes use of “sandboxing” i.e isolation in order to prevent cases where they carry a virus which can infect the entire system, similar to the way .exe files on MS Windows may. (More on MS and S&F later) - -#### Developer Perspective - -For developers, the advantages of developing S&F packages will probably be a lot clearer than they are to the average user, some of these were already hinted in a previous section of this post. - -Nonetheless, here they are: - -+ S&F will make it easier on devs who want to develop for more than one Linux distribution by unifying the process of development, therefore minimizing the amount of work a developer needs to do in order to get his app running on multiple distributions. - -++ Developers could therefore gain easier access to a wider range of distributions. - -+ S&F allow devs to privately distribute their packages without being dependent on distribution maintainers to stabilize their package for each and every distro. - -++ Through the above, devs may gain access to direct statistics of user adoption / engagement for their software. - -++ Also through the above, devs could get more directly involved with users, rather than having to do so through a middleman, in this case, the distribution. - -### The Downsides - -– Bloat. Simple as that. Flatpak and Snap aren’t just magic making dependencies evaporate into thin air. Rather, instead of relying on the target system to provide the required dependencies, S&F comes with the dependencies prebuilt into them. - -As the saying goes “if the mountain won’t come to Muhammad, Muhammad must go to the mountain…” - -– Just as the security-aware user might enjoy S&F packages extra layer of isolation, as long they come from a trusted source. The less knowledgeable user on the hand, might be prone to the other side of the coin hazard which is using a package from an unknown source which may contain malicious software. - -The above point can be said to be valid even with today’s popular methods, as PPAs, overlays, etc might also be maintained by untrusted sources. - -However, with S&F packages the risk increases since malicious software developers need to create only one version of their program in order to infect a large number of distributions, whereas, without it they’d needed to create multiple versions in order to adjust their malware to other distributions. - -Was Microsoft Right All Along? - -With all that’s mentioned above in mind, it’s pretty clear that for the most part, the advantages of using S&F packages outweighs the drawbacks. - -At the least for users of binary-based distributions, or, non lightweight focused distros. - -Which eventually lead me to asking the above question – could it be that Microsoft was right all along? if so and S&F becomes the Linux standard, would you still consider Linux a Unix-like variant? - -Well apparently, the best one to answer those questions is probably time. - -Nevertheless, I’d argue that even if not entirely right, MS certainly has a good point to their credit, and having all these methods available here on Linux out of the box is certainly a plus in my book. - - --------------------------------------------------------------------------------- - -via: http://www.iwillfolo.com/ubuntus-snap-red-hats-flatpack-and-is-one-fits-all-linux-packages-useful/ - -作者:[Editorials][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.iwillfolo.com/category/editorials/ diff --git a/sources/talk/20160912 Adobe's new CIO shares leadership advice for starting a new role.md b/sources/talk/20160912 Adobe's new CIO shares leadership advice for starting a new role.md new file mode 100644 index 0000000000..a4a962e8d2 --- /dev/null +++ b/sources/talk/20160912 Adobe's new CIO shares leadership advice for starting a new role.md @@ -0,0 +1,50 @@ +Adobe's new CIO shares leadership advice for starting a new role +==== + +![](https://enterprisersproject.com/sites/default/files/styles/620x350/public/images/CIO_Leadership_3.png?itok=QWUGMw-V) + +I’m currently a few months into a new CIO role at a highly-admired, cloud-based technology company. One of my first tasks was to get to know the organization’s people, culture, and priorities. + +As part of that goal, I am visiting all the major IT sites. While In India, less than two months into the job, I was asked directly: “What are you going to do? What is your plan?” My response, which will not surprise seasoned CIOs, was that I was still in discovery mode, and I was there to listen and learn. + +I’ve never gone into an organization with a set blueprint for what I’ll do. I know some CIOs have a playbook for how they will operate. They’ll come in and blow the whole organization up and put their set plan in motion. + +Yes, there may be situations where things are massively broken and not working, so that course of action makes sense. Once I’m inside a company, however, my strategy is to go through a discovery process. I don’t want to have any preconceived notions about the way things should be or what’s working versus what’s not. + +Here are my guiding principles as a newly-appointed leader: + +### Get to know your people + +This means building relationships, and it includes your IT staff as well as your business users and your top salespeople. What are the top things on their lists? What do they want you to focus on? What’s working well? What’s not? How is the customer experience? Knowing how you can help everyone be more successful will help you shape the way you deliver services to them. + +If your department is spread across several floors, as mine is, consider meet-and-greet lunches or mini-tech fairs so people can introduce themselves, discuss what they’re working on, and share stories about their family, if they feel comfortable doing that. If you have an open-door office policy, make sure they know that as well. If your staff spreads across countries or continents, get out there and visit as soon as you reasonably can. + +### Get to know your products and company culture + +One of the things that surprised me coming into to Adobe was how broad our product portfolio is. We have a platform of solutions and services across three clouds – Adobe Creative Cloud, Document Cloud and Marketing Cloud – and a vast portfolio of products within each. You’ll never know how much opportunity your new company presents until you get to know your products and learn how to support all of them. At Adobe we use many of our digital media and digital marketing solutions as Customer Zero, so we have first-hand experiences to share with our customers + +### Get to know customers + +Very early on, I started getting requests to meet with customers. Meeting with customers is a great way to jump-start your thinking into the future of the IT organization, which includes the different types of technologies, customers, and consumers we could have going forward. + +### Plan for the future + +As a new leader, I have a fresh perspective and can think about the future of the organization without getting distracted by challenges or obstacles. + +What CIOs need to do is jump-start IT into its next generation. When I meet my staff, I’m asking them what we want to be three to five years out so we can start positioning ourselves for that future. That means discussing the initiatives and priorities. + +After that, it makes sense to bring the leadership team together so you can work to co-create the next generation of the organization – its mission, vision, modes of alignment, and operating norms. If you start changing IT from the inside out, it will percolate into business and everything else you do. + +Through this whole process, I’ve been very open with people that this is not going to be a top-down directive. I have ideas on priorities and what we need to focus on, but we have to be in lockstep, working as a team and figuring out what we want to do jointly. + +-------------------------------------------------------------------------------- + +via: https://enterprisersproject.com/article/2016/9/adobes-new-cio-shares-leadership-advice-starting-new-role + +作者:[Cynthia Stoddard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://enterprisersproject.com/user/cynthia-stoddard diff --git a/sources/talk/20160913 Linus Torvalds reveals his favorite programming laptop.md b/sources/talk/20160913 Linus Torvalds reveals his favorite programming laptop.md new file mode 100644 index 0000000000..9741a58fcc --- /dev/null +++ b/sources/talk/20160913 Linus Torvalds reveals his favorite programming laptop.md @@ -0,0 +1,62 @@ +Linus Torvalds reveals his favorite programming laptop +==== + +>It's the Dell XPS 13 Developer Edition. Here's why. + +I recently talked with some Linux developers about what the best laptop is for serious programmers. As a result I checked out several laptops from a programmer's viewpoint. The winner in my book? The 2016 Dell XPS 13 Developer Edition. I'm in good company. Linus Torvalds, Linux's creator, agrees. The Dell XPS 13 Developer Edition, for him, is the best laptop around. + +![](http://zdnet3.cbsistatic.com/hub/i/r/2016/07/18/702609c3-db38-4603-9f5f-4dcc3d71b140/resize/770xauto/50a8ba1c2acb1f0994aec2115d2e55ce/2016-dell-xps-13.jpg) + +Torvald's requirements may not be yours though. + +On Google+, Torvalds explained, "First off: [I don't use my laptop as a desktop replacement][1], and I only travel for a small handful of events each year. So for me, the laptop is a fairly specialized thing that doesn't get daily (or even weekly) use, so the main criteria are not some kind of "average daily use", but very much "travel use". + +Therefore, for Torvalds, "I end up caring a lot about it being fairly small and light, because I may end up carrying it around all day at a conference. I also want it to have a good screen, because by now I'm just used to it at my main desktop, and I want my text to be legible but small." + +The Dell's display is powered by Intel's Iris 540 GPU. In my experience it works really well. + +The Iris powers a 13.3 inch display with a 3,200×1,800 touchscreen. That's 280 pixels per inch, 40 more than my beloved [2015 Chromebook Pixel][2] and 60 more than a [MacBook Pro with Retina][3]. + +However, getting that hardware to work and play well with the [Gnome][4] desktop isn't easy. As Torvalds explained in another post, it "has the [same resolution as my desktop][5], but apparently because the laptop screen is smaller, Gnome seems to decide on its own that I need an automatic scaling factor of 2, which blows up all the stupid things (window decorations, icons etc) to a ridiculous degree". + +The solution? You can forget about looking to the user interface. You need to go to the shell and run: gsettings set org.gnome.desktop.interface scaling-factor 1. + +Torvalds may use Gnome, but he's [never liked the Gnome 3.x family much][6]. I can't argue with him. That's why I use [Cinnamon][7] instead. + +He also wants "a reasonably powerful CPU, because when I'm traveling I still build the kernel a lot. I don't do my normal full 'make allmodconfig' build between each pull request like I do at home, but I'd like to do it more often than I did with my previous laptop, which is actually (along with the screen) the main reason I wanted to upgrade." + +Linus doesn't describe the features of his XPS 13, but my review unit was a high-end model. It came with dual-core, 2.2GHz 6th Generation Intel Core i7-6560U Skylake processor and 16GBs of DDR3 RAM with a half a terabyte, PCIe solid state drive (SSD). I'm sure Torvalds' system is at least that well-equipped. + +Some features you may care about aren't on Torvalds' list. + +>"What I don't tend to care about is touch-screens, because my fingers are big and clumsy compared to the text I'm looking at (I also can't handle the smudges: maybe I just have particularly oily fingers, but I really don't want to touch that screen). + +I also don't care deeply about some 'all day battery life', because quite frankly, I can't recall the last time I didn't have access to power. I might not want to bother to plug it in for some quick check, but it's just not a big overwhelming issue. By the time battery life is in 'more than a couple of hours', I just don't care very much any more." +Dell claims the XPS 13, with its 56wHR, 4-Cell Battery, has about a 12-hour battery life. It has well over 10 in my experience. I haven't tried to run it down to the dregs. + +Torvalds also didn't have any trouble with the Intel Wi-Fi set. The non Developer Edition uses a Broadcom chip set and that has proven troublesome for both Windows and Linux users. Dell technical support was extremely helpful to me in getting this problem under control. + +Some people have trouble with the XPS 13 touchpad. Neither I nor Torvalds have any worries. Torvalds wrote, the "XPS13 touchpad works very well for me. That may be a personal preference thing, but it seems to be both smooth and responsive." + +Still, while Torvalds likes the XPS 13, he's also fond of the latest Lenovo X1 Carbon, HP Spectre 13 x360, and last year's Lenovo Yoga 900. Me? I like the XPS 13 Developer Editor. The price tag, which for the model I reviewed was $1949.99, may keep you from reaching for your credit card. + +Still, if you want to develop like one of the world's top programmers, the Dell XPS 13 Developer Edition is worth the money. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/linus-torvalds-reveals-his-favorite-programming-laptop/ + +作者:[Steven J. Vaughan-Nichols ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ +[1]: https://plus.google.com/+LinusTorvalds/posts/VZj8vxXdtfe +[2]: http://www.zdnet.com/article/the-best-chromebook-ever-the-chromebook-pixel-2015/ +[3]: http://www.zdnet.com/product/apple-15-inch-macbook-pro-with-retina-display-mid-2015/ +[4]: https://www.gnome.org/ +[5]: https://plus.google.com/+LinusTorvalds/posts/d7nfnWSXjfD +[6]: http://www.zdnet.com/article/linus-torvalds-finds-gnome-3-4-to-be-a-total-user-experience-design-failure/ +[7]: http://www.zdnet.com/article/how-to-customise-your-linux-desktop-cinnamon/ diff --git a/sources/talk/20160915 Should Smartphones Do Away with the Headphone Jack Here Are Our Thoughts.md b/sources/talk/20160915 Should Smartphones Do Away with the Headphone Jack Here Are Our Thoughts.md new file mode 100644 index 0000000000..0bf4b144f9 --- /dev/null +++ b/sources/talk/20160915 Should Smartphones Do Away with the Headphone Jack Here Are Our Thoughts.md @@ -0,0 +1,54 @@ +Should Smartphones Do Away with the Headphone Jack? Here Are Our Thoughts +==== + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/09/Writers-Opinion-Headphone-Featured.jpg) + +Even though Apple removing the headphone jack from the iPhone 7 has been long-rumored, after the official announcement last week confirming the news, it has still become a hot topic. + +For those not in the know on this latest news, Apple has removed the headphone jack from the phone, and the headphones will now plug into the lightning port. Those that want to still use their existing headphones may, as there is an adapter that ships with the phone along with the lightning headphones. They are also selling a new product: AirPods. These are wireless and are inserted into your ear. The biggest advantage is that by eliminating the jack they were able to make the phone dust and water-resistant. + +Being it’s such a big story right now, we asked our writers, “What are your thoughts on Smartphones doing away with the headphone jack?” + +### Our Opinion + +Derrik believes that “Apple’s way of doing it is a play to push more expensive peripherals that do not comply to an open standard.” He also doesn’t want to have to charge something every five hours, meaning the AirPods. While he understands that the 3.5mm jack is aging, as an “audiophile” he would love a new, open standard, but “proprietary pushes” worry him about device freedom. + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/09/headphone-jacks.jpg) + +Damien doesn’t really even use the headphone jack these days as he has Bluetooth headphones. He hates that wire anyway, so feels “this is a good move.” Yet he also understands Derrik’s point about the wireless headphones running out of battery, leaving him with “nothing to fall back on.” + +Trevor is very upfront in saying he thought it was “dumb” until he heard you couldn’t charge the phone and use the headphones at the same time and realized it was “dumb X 2.” He uses the headphones/headphone jack all the time in a work van without Bluetooth and listens to audio or podcasts. He uses the plug-in style as Bluetooth drains his battery. + +Simon is not a big fan. He hasn’t seen much reasoning past it leaving more room within the device. He figures “it will then come down to whether or not consumers favor wireless headphones, an adapter, and water-resistance over not being locked into AirPods, lightning, or an adapter”. He fears it might be “too early to jump into removing ports” and likes a “one pair fits all” standard. + +James believes that wireless technology is progressive, so he sees it as a good move “especially for Apple in terms of hardware sales.” He happens to use expensive headphones, so personally he’s “yet to be convinced,” noting his Xperia is waterproof and has a jack. + +Jeffry points out that “almost every transition attempt in the tech world always starts with strong opposition from those who won’t benefit from the changes.” He remembers the flak Apple received when they removed the floppy disk drive and decided not to support Flash, and now both are industry standards. He believes everything is evolving for the better, removing the audio jack is “just the first step toward the future,” and Apple is just the one who is “brave enough to lead the way (and make a few bucks in doing so).” + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/09/Writers-Opinion-Headphone-Headset.jpg) + +Vamsi doesn’t mind the removal of the headphone jack as long as there is a “better solution applicable to all the users that use different headphones and other gadgets.” He doesn’t feel using headphones via a lightning port is a good solution as it renders nearly all other headphones obsolete. Regarding Bluetooth headphones, he just doesn’t want to deal with another gadget. Additionally, he doesn’t get the argument of it being good for water resistance since there are existing devices with headphone jacks that are water resistant. + +Mahesh prefers a phone with a jack because many times he is charging his phone and listening to music simultaneously. He believes we’ll get to see how it affects the public in the next few months. + +Derrik chimed back in to say that by “removing open standard ports and using a proprietary connection too.,” you can be technical and say there are adapters, but Thunderbolt is also closed, and Apple can stop selling those adapters at any time. He also notes that the AirPods won’t be Bluetooth. + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/09/Writers-Opinion-Headphone-AirPods.jpg) + +As for me, I’m always up for two things: New technology and anything Apple. I’ve been using iPhones since a few weeks past the very first model being introduced, yet I haven’t updated since 2012 and the iPhone 5, so I was overdue. I’ll be among the first to get my hands on the iPhone 7. I hate that stupid white wire being in my face, so I just might be opting for AirPods at some point. I am very appreciative of the phone becoming water-resistant. As for charging vs. listening, the charge on new iPhones lasts so long that I don’t expect it to be much of a problem. Even my old iPhone 5 usually lasts about twenty hours on a good day and twelve hours on a bad day. So I don’t expect that to be a problem. + +### Your Opinion + +Our writers have given you a lot to think about. What are your thoughts on Smartphones doing away with the headphone jack? Will you miss it? Is it a deal breaker for you? Or do you relish the upgrade in technology? Will you be trying the iPhone 5 or the AirPods? Let us know in the comments below. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/should-smartphones-do-away-with-the-headphone-jack/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier + +作者:[Laura Tucker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.maketecheasier.com/author/lauratucker/ diff --git a/sources/talk/20160915 What the rise of permissive open source licenses means.md b/sources/talk/20160915 What the rise of permissive open source licenses means.md new file mode 100644 index 0000000000..9a17fec1e0 --- /dev/null +++ b/sources/talk/20160915 What the rise of permissive open source licenses means.md @@ -0,0 +1,57 @@ +What the rise of permissive open source licenses means +==== + +Why restrictive licenses such as the GNU GPL are steadily falling out of favor. + +"If you use any open source software, you have to make the rest of your software open source." That's what former Microsoft CEO Steve Ballmer said back in 2001, and while his statement was never true, it must have spread some FUD (fear, uncertainty and doubt) about free software. Probably that was the intention. + +This FUD about open source software is mainly about open source licensing. There are many different licenses, some more restrictive (some people use the term "protective") than others. Restrictive licenses such as the GNU General Public License (GPL) use the concept of copyleft, which grants people the right to freely distribute copies and modified versions of a piece of software as long as the same rights are preserved in derivative works. The GPL (v3) is used by open source projects such as bash and GIMP. There's also the Affero GPL, which provides copyleft to software that is offered over a network (for example as a web service.) + +What this means is that if you take code that is licensed in this way and you modify it by adding some of your own proprietary code, then in some circumstances the whole new body of code, including your code, becomes subject to the restrictive open source license. It was this type of license that Ballmer was probably referring to when he made his statement. + +But permissive licenses are a different animal. The MIT License, for example, lets anyone take open source code and do what they want with it — including modifying and selling it — as long as they provide attribution and don't hold the developer liable. Another popular permissive open source license, the Apache License 2.0, also provides an express grant of patent rights from contributors to users. JQuery, the .NET Core and Rails are licensed using the MIT license, while the Apache 2.0 license is used by software including Android, Apache and Swift. + +Ultimately both license types are intended to make software more useful. Restrictive licenses aim to foster the open source ideals of participation and sharing so everyone gets the maximum benefit from software. And permissive licenses aim to ensure that people can get the maximum benefit from software by allowing them to do what they want with it — even if that means they take the code, modify it and keep it for themselves or even sell the resulting work as proprietary software without contributing anything back. + +Figures compiled by open source license management company Black Duck Software show that the restrictive GPL 2.0 was the most commonly used open source license last year with about 25 percent of the market. The permissive MIT and Apache 2.0 licenses were next with about 18 percent and 16 percent respectively, followed by the GPL 3.0 with about 10 percent. That's almost evenly split at 35 percent restrictive and 34 percent permissive. + +But this snapshot misses the trend. Black Duck's data shows that in the six years from 2009 to 2015 the MIT license's share of the market has gone up 15.7 percent and Apache's share has gone up 12.4 percent. GPL v2 and v3's share during the same period has dropped by a staggering 21.4 percent. In other words there was a significant move away from restrictive licenses and towards permissive ones during that period. + +And the trend is continuing. Black Duck's [latest figures][1] show that MIT is now at 26 percent, GPL v2 21 percent, Apache 2 16 percent, and GPL v3 9 percent. That's 30 percent restrictive, 42 percent permissive — a huge swing from last year’s 35 percent restrictive and 34 percent permissive. Separate [research][2] of the licenses used on GitHub appears to confirm this shift. It shows that MIT is overwhelmingly the most popular license with a 45 percent share, compared to GLP v2 with just 13 percent and Apache with 11 percent. + +![](http://images.techhive.com/images/article/2016/09/open-source-licenses.jpg-100682571-large.idge.jpeg) + +### Driving the trend + +What’s behind this mass move from restrictive to permissive licenses? Do companies fear that if they let restrictive software into the house they will lose control of their proprietary software, as Ballmer warned? In fact, that may well be the case. Google, for example, has [banned Affero GPL software][3] from its operations. + +Jim Farmer, chairman of [Instructional Media + Magic][4], a developer of open source technology for education, believes that many companies avoid restrictive licenses to avoid legal difficulties. "The problem is really about complexity. The more complexity in a license, the more chance there is that someone has a cause of action to bring you to court. Complexity makes litigation more likely," he says. + +He adds that fear of restrictive licenses is being driven by lawyers, many of whom recommend that clients use software that is licensed with the MIT or Apache 2.0 licenses, and who specifically warn against the Affero license. + +This has a knock-on effect with software developers, he says, because if companies avoid software with restrictive licenses then developers have more incentive to license their new software with permissive ones if they want it to get used. + +But Greg Soper, CEO of SalesAgility, the company behind the open source SuiteCRM, believes that the move towards permissive licenses is also being driven by some developers. "Look at an application like Rocket.Chat. The developers could have licensed that with GPL 2.0 or Affero but they chose a permissive license," he says. "That gives the app the widest possible opportunity, because a proprietary vendor can take it and not harm their product or expose it to an open source license. So if a developer wants an application to be used inside a third-party application it makes sense to use a permissive license." + +Soper points out that restrictive licenses are designed to help an open source project succeed by stopping developers from taking other people's code, working on it, and then not sharing the results back with the community. "The Affero license is critical to the health of our product because if people could make a fork that was better than ours and not give the code back that would kill our product," he says. "For Rocket.Chat it's different because if it used Affero then it would pollute companies' IP and so it wouldn't get used. Different licenses have different use cases." + +Michael Meeks, an open source developer who has worked on Gnome, OpenOffice and now LibreOffice, agrees with Jim Farmer that many companies do choose to use software with permissive licenses for fear of legal action. "There are risks with copyleft licenses, but there are also huge benefits. Unfortunately people listen to lawyers, and lawyers talk about risk but they never tell you that something is safe." + +Fifteen years after Ballmer made his inaccurate statement it seems that the FUD it generated it is still having an effect — even if the move from restrictive licenses to permissive ones is not quite the effect he intended. + +-------------------------------------------------------------------------------- + +via: http://www.cio.com/article/3120235/open-source-tools/what-the-rise-of-permissive-open-source-licenses-means.html + +作者:[Paul Rubens ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.cio.com/author/Paul-Rubens/ +[1]: https://www.blackducksoftware.com/top-open-source-licenses +[2]: https://github.com/blog/1964-open-source-license-usage-on-github-com +[3]: http://www.theregister.co.uk/2011/03/31/google_on_open_source_licenses/ +[4]: http://immagic.com/ + diff --git a/sources/tech/20160506 Setup honeypot in Kali Linux.md b/sources/tech/20160506 Setup honeypot in Kali Linux.md new file mode 100644 index 0000000000..cb85992389 --- /dev/null +++ b/sources/tech/20160506 Setup honeypot in Kali Linux.md @@ -0,0 +1,84 @@ +Setup honeypot in Kali Linux +==== + +The Pentbox is a safety kit containing various tools for streamlining PenTest conducting a job easily. It is programmed in Ruby and oriented to GNU / Linux, with support for Windows, MacOS and every systems where Ruby is installed. In this small article we will explain how to set up a honeypot in Kali Linux. If you don’t know what is a honeypot, “a honeypot is a computer security mechanism set to detect, deflect, or, in some manner, counteract attempts at unauthorized use of information systems.” + +### Download Pentbox: + +Simply type in the following command in your terminal to download pentbox-1.8. + +``` +root@kali:~# wget http://downloads.sourceforge.net/project/pentbox18realised/pentbox-1.8.tar.gz +``` + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-1.jpg) + +### Uncompress pentbox files + +Decompressing the file with the following command: + +``` +root@kali:~# tar -zxvf pentbox-1.8.tar.gz +``` + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-2.jpg) + +### Run pentbox ruby script + +Change directory into pentbox folder + +``` +root@kali:~# cd pentbox-1.8/ +``` + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-3.jpg) + +Run pentbox using the following command + +``` +root@kali:~# ./pentbox.rb +``` + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-4.jpg) + +### Setup a honeypot + +Use option 2 (Network Tools) and then option 3 (Honeypot). + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-5.jpg) + +Finally for first test, choose option 1 (Fast Auto Configuration) + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-6.jpg) + +This opens up a honeypot in port 80. Simply open browser and browse to http://192.168.160.128 (where 192.168.160.128 is your IP Address. You should see an Access denied error. + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-7.jpg) + +and in the terminal you should see “HONEYPOT ACTIVATED ON PORT 80” followed by “INTRUSION ATTEMPT DETECTED”. + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-8.jpg) + +Now, if you do the same steps but this time select Option 2 (Manual Configuration), you should see more extra options + +![](https://www.blackmoreops.com/wp-content/uploads/2016/05/Set-up-a-honeypot-in-Kali-Linux-blackMORE-Ops-9.jpg) + +Do the same steps but select port 22 this time (SSH Port). Then do a port forwarding in your home router to forward port external port 22 to this machines’ port 22. Alternatively, set it up in a VPS in your cloud server. + +You’d be amazed how many bots out there scanning port SSH continuously. You know what you do then? You try to hack them back for the lulz! + +Here’s a video of setting up honeypot if video is your thing: + + + +-------------------------------------------------------------------------------- + +via: https://www.blackmoreops.com/2016/05/06/setup-honeypot-in-kali-linux/ + +作者:[blackmoreops.com][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: blackmoreops.com diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md new file mode 100644 index 0000000000..29b3bf04da --- /dev/null +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -0,0 +1,219 @@ +Understanding Different Classifications of Shell Commands and Their Usage in Linux +==== + +When it comes to gaining absolute control over your Linux system, then nothing comes close to the command line interface (CLI). In order to become a Linux power user, one must understand the [different types of shell commands][1] and the appropriate ways of using them from the terminal. + +In Linux, there are several types of commands, and for a new Linux user, knowing the meaning of different commands enables for efficient and precise usage. Therefore, in this article, we shall walk through the various classifications of shell commands in Linux. + +One important thing to note is that the command line interface is different from the shell, it only provides a means for you to access the shell. The shell, which is also programmable then makes it possible to communicate with the kernel using commands. + +Different classifications of Linux commands fall under the following classifications: + +### 1. Program Executables (File System Commands) + +When you run a command, Linux searches through the directories stored in the $PATH environmental variable from left to right for the executable of that specific command. + +You can view the directories in the $PATH as follows: + +``` +$ echo $PATH +/home/aaronkilik/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games +``` + +In the above order, the directory /home/aaronkilik/bin will be searched first followed by /usr/local/sbin and so on, the order is significant in the search process. + +Examples of file system commands in /usr/bin directory: + +``` +$ ll /bin/ +``` + +Sample Output + +``` +total 16284 +drwxr-xr-x 2 root root 4096 Jul 31 16:30 ./ +drwxr-xr-x 23 root root 4096 Jul 31 16:29 ../ +-rwxr-xr-x 1 root root 6456 Apr 14 18:53 archdetect* +-rwxr-xr-x 1 root root 1037440 May 17 16:15 bash* +-rwxr-xr-x 1 root root 520992 Jan 20 2016 btrfs* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-calc-size* +lrwxrwxrwx 1 root root 5 Jul 31 16:19 btrfsck -> btrfs* +-rwxr-xr-x 1 root root 278376 Jan 20 2016 btrfs-convert* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-debug-tree* +-rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-find-root* +-rwxr-xr-x 1 root root 270136 Jan 20 2016 btrfs-image* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-map-logical* +-rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-select-super* +-rwxr-xr-x 1 root root 253816 Jan 20 2016 btrfs-show-super* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfstune* +-rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-zero-log* +-rwxr-xr-x 1 root root 31288 May 20 2015 bunzip2* +-rwxr-xr-x 1 root root 1964536 Aug 19 2015 busybox* +-rwxr-xr-x 1 root root 31288 May 20 2015 bzcat* +lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzcmp -> bzdiff* +-rwxr-xr-x 1 root root 2140 May 20 2015 bzdiff* +lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzegrep -> bzgrep* +-rwxr-xr-x 1 root root 4877 May 20 2015 bzexe* +lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* +-rwxr-xr-x 1 root root 3642 May 20 2015 bzgrep* +``` + +### 2. Linux Aliases + +These are user defined commands, they are created using the alias shell built-in command, and contain other shell commands with some options and arguments. The ideas is to basically use new and short names for lengthy commands. + +The syntax for creating an alias is as follows: + +``` +$ alias newcommand='command -options' +``` + +To list all aliases on your system, issue the command below: + +``` +$ alias -p +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias grep='grep --color=auto' +alias l='ls -CF' +alias la='ls -A' +alias ll='ls -alF' +alias ls='ls --color=auto' +``` + +To create a new alias in Linux, go through some below examples. + +``` +$ alias update='sudo apt update' +$ alias upgrade='sudo apt dist-upgrade' +$ alias -p | grep 'up' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/08/Create-Aliase-in-Linux.png) + +However, the aliases we have created above only work temporarily, when the system is restarted, they will not work after the next boot. You can set permanent aliases in your `.bashrc` file as shown below. + +![](http://www.tecmint.com/wp-content/uploads/2016/08/Set-Linux-Aliases-Permanent.png) + +After adding them, run the command below to active. + +``` +$ source ~/.bashrc +``` + +### 3. Linux Shell Reserved Words + +In shell programming, words such as if, then, fi, for, while, case, esac, else, until and many others are shell reserved words. As the description implies, they have specialized meaning to the shell. + +You can list out all Linux shell keywords using type command as shown: + +``` +$ type if then fi for while case esac else until +if is a shell keyword +then is a shell keyword +fi is a shell keyword +for is a shell keyword +while is a shell keyword +case is a shell keyword +esac is a shell keyword +else is a shell keyword +until is a shell keyword +``` + +Suggested Read: 10 Useful Linux Chaining Operators with Practical Examples + +### 4. Linux Shell Functions + +A shell function is a group of commands that are executed collectively within the current shell. Functions help to carry out a specific task in a shell script. The conventional form of writing shell functions in a script is: + +``` +function_name() { +command1 +command2 +……. +} +``` + +Alternatively, + +``` +function function_name { +command1 +command2 +……. +} +``` + +Let’s take a look at how to write shell functions in a script named shell_functions.sh. + +``` +#!/bin/bash +#write a shell function to update and upgrade installed packages +upgrade_system(){ +sudo apt update; +sudo apt dist-upgrade; +} +#execute function +upgrade_system +``` + +Instead of executing the two commands: sudo apt update and sudo apt dist-upgrade from the command line, we have written a simple shell function to execute the two commands as a single command, upgrade_system within a script. + +Save the file and thereafter, make the script executable. Finally run it as below: + +``` +$ chmod +x shell_functions.sh +$ ./shell_functions.sh +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-Shell-Functions-Script.png) + +### 5. Linux Shell Built-in Commands + +These are Linux commands that built into the shell, thus you cannot find them within the file system. They include pwd, cd, bg, alias, history, type, source, read, exit and many others. + +You can list or check Linux built-in commands using type command as shown: + +``` +$ type pwd +pwd is a shell builtin +$ type cd +cd is a shell builtin +$ type bg +bg is a shell builtin +$ type alias +alias is a shell builtin +$ type history +history is a shell builtin +``` + +Learn about some Linux built-in Commands usage: + +- [15 ‘pwd’ Command Examples in Linux][2] +- [15 ‘cd’ Command Examples in Linux][3] +- [Learn The Power of Linux ‘history’ Command][4] + +### Conclusion + +As a Linux user, it is always important to know the type of command you are running. I believe, with the precise and simple-to-understand explanation above including a few relevant illustrations, you probably have a good understanding of the [various categories of Linux commands][5]. + +You can as well get in tough through the comment section below for any questions or supplementary ideas that you would like to offer us. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ + +作者:[Aaron Kili ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.tecmint.com/author/aaronkili/ +[1]: http://www.tecmint.com/different-types-of-linux-shells/ +[2]: http://www.tecmint.com/pwd-command-examples/ +[3]: http://www.tecmint.com/cd-command-in-linux/ +[4]: http://www.tecmint.com/history-command-examples/ +[5]: http://www.tecmint.com/category/linux-commands/ diff --git a/sources/tech/20160827 4 Best Linux Boot Loaders.md b/sources/tech/20160827 4 Best Linux Boot Loaders.md new file mode 100644 index 0000000000..7ea63cdb94 --- /dev/null +++ b/sources/tech/20160827 4 Best Linux Boot Loaders.md @@ -0,0 +1,78 @@ +translating by ucasFL + +4 Best Linux Boot Loaders +==== + +When you turn on your machine, immediately after POST (Power On Self Test) is completed successfully, the BIOS locates the configured bootable media, and reads some instructions from the master boot record (MBR) or GUID partition table which is the first 512 bytes of the bootable media. The MBR contains two important sets of information, one is the boot loader and two, the partition table. + +### What is a Boot Loader? + +A boot loader is a small program stored in the MBR or GUID partition table that helps to load an operating system into memory. Without a boot loader, your operating system can not be loaded into memory. + +There are several boot loaders we can install together with Linux on our systems and in this article, we shall briefly talk about a handful of the best Linux boot loaders to work with. + +### 1. GNU GRUB + +GNU GRUB is a popular and probably the most used multiboot Linux boot loader available, based on the original GRUB (GRand Unified Bootlader) which was created by Eirch Stefan Broleyn. It comes with several improvements, new features and bug fixes as enhancements of the original GRUB program. + +Importantly, GRUB 2 has now replaced the GRUB. And notably, the name GRUB was renamed to GRUB Legacy and is not actively developed, however, it can be used for booting older systems since bug fixes are still on going. + +GRUB has the following prominent features: + +- Supports multiboot +- Supports multiple hardware architectures and operating systems such as Linux and Windows +- Offers a Bash-like interactive command line interface for users to run GRUB commands as well interact with configuration files +- Enables access to GRUB editor +- Supports setting of passwords with encryption for security +- Supports booting from a network combined with several other minor features + +Visit Homepage: + +### 2. LILO (Linux Loader) + +LILO is a simple yet powerful and stable Linux boot loader. With the growing popularity and use of GRUB, which has come with numerous improvements and powerful features, LILO has become less popular among Linux users. + +While it loads, the word “LILO” is displayed on the screen and each letter appears before or after a particular event has occurred. However, the development of LILO was stopped in December 2015, it has a number of features as listed below: + +- Does not offer an interactive command line interface +- Supports several error codes +- Offers no support for booting from a network +- All its files are stored in the first 1024 cylinders of a drive +- Faces limitation with BTFS, GPT and RAID plus many more. + +Visit Homepage: + +### 3. BURG – New Boot Loader + +Based on GRUB, BURG is a relatively new Linux boot loader. Because it is derived from GRUB, it ships in with some of the primary GRUB features, nonetheless, it also offers remarkable features such as a new object format to support multiple platforms including Linux, Windows, Mac OS, FreeBSD and beyond. + +Additionally, it supports a highly configurable text and graphical mode boot menu, stream plus planned future improvements for it to work with various input/output devices. + +Visit Homepage: + +### 4. Syslinux + +Syslinux is an assortment of light weight boot loaders that enable booting from CD-ROMs, from a network and so on. It supports filesystems such as FAT for MS-DOS, and ext2, ext3, ext4 for Linux. It as well supports uncompressed single-device Btrfs. + +Note that Syslinux only accesses files in its own partition, therefore, it does not offer multi-filesystem boot capabilities. + +Visit Homepage: + +### Conclusion + +A boot loader allows you to manage multiple operating systems on your machine and select which one to use at a particular time, without it, your machine can not load the kernel and the rest of the operating system files. + +Have we missed any tip-top Linux boot loader here? If so, then let us know by using the comment form below by making suggestions of any commendable boot loaders that can support Linux operating system. + + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ + +作者:[Aaron Kili][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.tecmint.com/best-linux-boot-loaders/ diff --git a/sources/tech/20160911 17 tar command practical examples in Linux.md b/sources/tech/20160911 17 tar command practical examples in Linux.md new file mode 100644 index 0000000000..d4634ef23c --- /dev/null +++ b/sources/tech/20160911 17 tar command practical examples in Linux.md @@ -0,0 +1,308 @@ +17 tar command practical examples in Linux +===== + +Tar (tape archive ) is the most widely used command in Unix like operating system for creating archive of multiple files and folders into a single archive file and that archive file can be further compressed using gzip and bzip2 techniques. In other words we can say that tar command is used to take backup by archiving multiple files and directory into a single tar or archive file and later on files & directories can be extracted from the tar compressed file. + +In this article we will discuss 17 practical examples of tar command in Linux. + +Syntax of tar command: + +``` +# tar +``` + +Some of the commonly used options in tar command are listed below : + +![](http://www.linuxtechi.com/wp-content/uploads/2016/09/tar-command-options.jpg) + +Note : hyphen ( – ) in the tar command options are optional. + +### Example: 1 Create a tar archive file + +Let’s create a tar file of /etc directory and ‘/root/ anaconda-ks.cfg’ file. + +``` +[root@linuxtechi ~]# tar -cvf myarchive.tar /etc /root/anaconda-ks.cfg +``` + +Above command will create a tar file with the name “myarchive” in the current folder. Tar file contains all the files and directories of /etc folder and anaconda-ks.cfg file. + +In the tar command ‘-c‘ option specify to create a tar file, ‘-v’ is used for verbose output and ‘-f’ option is used to specify the archive file name. + +``` +[root@linuxtechi ~]# ls -l myarchive.tar +-rw-r--r--. 1 root root 22947840 Sep 7 00:24 myarchive.tar +[root@linuxtechi ~]# +``` + +### Example:2 List the contents of tar archive file. + +Using ‘–t‘ option in tar command we can view the contents of tar files without extracting it. + +``` +[root@linuxtechi ~]# tar -tvf myarchive.tar +``` + +Listing a specific file or directory from tar file. In the below example i am trying to view whether ‘anaconda-ks.cfg’ file is there in the tar file or not. + +``` +[root@linuxtechi ~]# tar -tvf myarchive.tar root/anaconda-ks.cfg +-rw------- root/root 953 2016-08-24 01:33 root/anaconda-ks.cfg +[root@linuxtechi ~]# +``` + +### Example:3 Append or add files to end of archive or tar file. + +‘-r‘ option in the tar command is used to append or add file to existing tar file. Let’s add /etc/fstab file in ‘data.tar‘ + +``` +[root@linuxtechi ~]# tar -rvf data.tar /etc/fstab +``` + +Note: In the Compressed tar file we can’t append file or directory. + +### Example:4 Extracting files and directories from tar file. + +‘-x‘ option is used to extract the files and directories from the tar file. Let’s extract the content of above created tar file. + +``` +[root@linuxtechi ~]# tar -xvf myarchive.tar +``` + +This command will extract all the files and directories of myarchive tar file in the current working directory. + +### Example:5 Extracting tar file to a particular folder. + +In case you want to extract tar file to a particular folder or directory then use ‘-C‘ option and after that specify the path of a folder. + +``` +[root@linuxtechi ~]# tar -xvf myarchive.tar -C /tmp/ +``` + +### Example:6 Extracting particular file or directory from tar file. + +Let’s assume you want to extract only anaconda-ks.cfg file from the tar file under /tmp folder. + +Syntax : + +``` +# tar –xvf {tar-file } {file-to-be-extracted } -C {path-where-to-extract} + +[root@linuxtechi tmp]# tar -xvf /root/myarchive.tar root/anaconda-ks.cfg -C /tmp/ +root/anaconda-ks.cfg +[root@linuxtechi tmp]# ls -l /tmp/root/anaconda-ks.cfg +-rw-------. 1 root root 953 Aug 24 01:33 /tmp/root/anaconda-ks.cfg +[root@linuxtechi tmp]# +``` + +### Example:7 Creating and compressing tar file (tar.gz or .tgz ) + +Let’s assume that we want to create a tar file of /etc and /opt folder and also want to compress it using gzip tool. This can be achieved using ‘-z‘ option in tar command. Extensions of such tar files will be either tar.gz or .tgz + +``` +[root@linuxtechi ~]# tar -zcpvf myarchive.tar.gz /etc/ /opt/ +``` + +Or + +``` +[root@linuxtechi ~]# tar -zcpvf myarchive.tgz /etc/ /opt/ +``` + +### Example:8 Creating and compressing tar file ( tar.bz2 or .tbz2 ) + +Let’s assume that we want to create compressed (bzip2) tar file of /etc and /opt folder. This can be achieved by using the option ( -j) in the tar command.Extensions of such tar files will be either tar.bz2 or .tbz + +``` +[root@linuxtechi ~]# tar -jcpvf myarchive.tar.bz2 /etc/ /opt/ +``` + +Or + +``` +[root@linuxtechi ~]# tar -jcpvf myarchive.tbz2 /etc/ /opt/ +``` + +### Example:9 Excluding particular files or type while creating tar file. + +Using “–exclude” option in tar command we can exclude the particular file or file type while creating tar file. Let’s assume we want to exclude the file type of html while creating the compressed tar file. + +``` +[root@linuxtechi ~]# tar -zcpvf myarchive.tgz /etc/ /opt/ --exclude=*.html +``` + +### Example:10 Listing the contents of tar.gz or .tgz file + +Contents of tar file with the extensions tar.gz or .tgz is viewed by using the option ‘-t’. Example is shown below : + +``` +[root@linuxtechi ~]# tar -tvf myarchive.tgz | more +............................................. +drwxr-xr-x root/root 0 2016-09-07 08:41 etc/ +-rw-r--r-- root/root 541 2016-08-24 01:23 etc/fstab +-rw------- root/root 0 2016-08-24 01:23 etc/crypttab +lrwxrwxrwx root/root 0 2016-08-24 01:23 etc/mtab -> /proc/self/mounts +-rw-r--r-- root/root 149 2016-09-07 08:41 etc/resolv.conf +drwxr-xr-x root/root 0 2016-09-06 03:55 etc/pki/ +drwxr-xr-x root/root 0 2016-09-06 03:15 etc/pki/rpm-gpg/ +-rw-r--r-- root/root 1690 2015-12-09 04:59 etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 +-rw-r--r-- root/root 1004 2015-12-09 04:59 etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-7 +-rw-r--r-- root/root 1690 2015-12-09 04:59 etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Testing-7 +-rw-r--r-- root/root 3140 2015-09-15 06:53 etc/pki/rpm-gpg/RPM-GPG-KEY-foreman +.......................................................... +``` + +### Example:11 Listing the contents of tar.bz2 or .tbz2 file. + +Contents of tar file with the extensions tar.bz2 or .tbz2 is viewed by using the option ‘-t’. Example is shown below : + +``` +[root@linuxtechi ~]# tar -tvf myarchive.tbz2 | more +........................................................ +rwxr-xr-x root/root 0 2016-08-24 01:25 etc/pki/java/ +lrwxrwxrwx root/root 0 2016-08-24 01:25 etc/pki/java/cacerts -> /etc/pki/ca-trust/extracted/java/cacerts +drwxr-xr-x root/root 0 2016-09-06 02:54 etc/pki/nssdb/ +-rw-r--r-- root/root 65536 2010-01-12 15:09 etc/pki/nssdb/cert8.db +-rw-r--r-- root/root 9216 2016-09-06 02:54 etc/pki/nssdb/cert9.db +-rw-r--r-- root/root 16384 2010-01-12 16:21 etc/pki/nssdb/key3.db +-rw-r--r-- root/root 11264 2016-09-06 02:54 etc/pki/nssdb/key4.db +-rw-r--r-- root/root 451 2015-10-21 09:42 etc/pki/nssdb/pkcs11.txt +-rw-r--r-- root/root 16384 2010-01-12 15:45 etc/pki/nssdb/secmod.db +drwxr-xr-x root/root 0 2016-08-24 01:26 etc/pki/CA/ +drwxr-xr-x root/root 0 2015-06-29 08:48 etc/pki/CA/certs/ +drwxr-xr-x root/root 0 2015-06-29 08:48 etc/pki/CA/crl/ +drwxr-xr-x root/root 0 2015-06-29 08:48 etc/pki/CA/newcerts/ +drwx------ root/root 0 2015-06-29 08:48 etc/pki/CA/private/ +drwx------ root/root 0 2015-11-20 06:34 etc/pki/rsyslog/ +drwxr-xr-x root/root 0 2016-09-06 03:44 etc/pki/pulp/ +.............................................................. +``` + +### Example:12 Extracting or unzip tar.gz or .tgz files. + +tar files with extension tar.gz or .tgz is extracted or unzipped with option ‘-x’ and ‘-z’. Example is shown below : + +``` +[root@linuxtechi ~]# tar -zxpvf myarchive.tgz -C /tmp/ +``` + +Above command will extract tar file under /tmp folder. + +Note : Now a days tar command will take care compression file types automatically while extracting, it means it is optional for us to specify compression type in tar command. Example is shown below : + +``` +[root@linuxtechi ~]# tar -xpvf myarchive.tgz -C /tmp/ +``` + +### Example:13 Extracting or unzip tar.bz2 or .tbz2 files + +tar files with the extension tar.bz2 or .tbz2 is extract with option ‘-j’ and ‘-x’. Example is shown below: + +``` +[root@linuxtechi ~]# tar -jxpvf myarchive.tbz2 -C /tmp/ +``` + +Or + +``` +[root@linuxtechi ~]# tar xpvf myarchive.tbz2 -C /tmp/ +``` + +### Example:14 Scheduling backup with tar command + +There are some real time scenarios where we have to create the tar files of particular files and directories for backup purpose on daily basis. Let’s suppose we have to take backup of whole /opt folder on daily basis, this can be achieved by creating a cron job of tar command. Example is shown below : + +``` +[root@linuxtechi ~]# tar -zcvf optbackup-$(date +%Y-%m-%d).tgz /opt/ +``` + +Create a cron job for above command. + +### Example:15 Creating compressed archive or tar file with -T and -X option. + +There are some real time scenarios where we want tar command to take input from a file and that file will consists of path of files & directory that are to be archived and compressed, there might some files that we would like to exclude in the archive which are mentioned in input file. + +In the tar command input file is specified after ‘-T’ option and file which consists of exclude list is specified after ‘-X’ option. + +Let’s suppose we want to archive and compress the directories like /etc , /opt and /home and want to exclude the file ‘/etc/sysconfig/kdump’ and ‘/etc/sysconfig/foreman‘, Create a text file ‘/root/tar-include’ and ‘/root/tar-exclude’ and put the following contents in respective file. + +``` +[root@linuxtechi ~]# cat /root/tar-include +/etc +/opt +/home +[root@linuxtechi ~]# +[root@linuxtechi ~]# cat /root/tar-exclude +/etc/sysconfig/kdump +/etc/sysconfig/foreman +[root@linuxtechi ~]# +``` + +Now run the below command to create and compress archive file. + +``` +[root@linuxtechi ~]# tar zcpvf mybackup-$(date +%Y-%m-%d).tgz -T /root/tar-include -X /root/tar-exclude +``` + +### Example:16 View the size of .tar , .tgz and .tbz2 file. + +Use the below commands to view the size of tar and compressed tar files. + +``` +[root@linuxtechi ~]# tar -czf - data.tar | wc -c +427 +[root@linuxtechi ~]# tar -czf - mybackup-2016-09-09.tgz | wc -c +37956009 +[root@linuxtechi ~]# tar -czf - myarchive.tbz2 | wc -c +30835317 +[root@linuxtechi ~]# +``` + +### Example:17 Splitting big tar file into smaller files. + +In Unix like operating big file is divided or split into smaller files using split command. Big tar file can also be divided into the smaller parts using split command. + +Let’s assume we want to split ‘mybackup-2016-09-09.tgz‘ file into smaller parts of each 6 MB. + +``` +Syntax : split -b . “prefix-name” +``` + +``` +[root@linuxtechi ~]# split -b 6M mybackup-2016-09-09.tgz mybackup-parts +``` + +Above command will split the mybackup compressed tar file into the smaller files each of size 6 MB in current working directory and split file names will starts from mybackup-partsaa … mybackup-partsag. In case if you want to append numbers in place of alphabets then use ‘-d’ option in above split command. + +``` +[root@linuxtechi ~]# ls -l mybackup-parts* +-rw-r--r--. 1 root root 6291456 Sep 10 03:05 mybackup-partsaa +-rw-r--r--. 1 root root 6291456 Sep 10 03:05 mybackup-partsab +-rw-r--r--. 1 root root 6291456 Sep 10 03:05 mybackup-partsac +-rw-r--r--. 1 root root 6291456 Sep 10 03:05 mybackup-partsad +-rw-r--r--. 1 root root 6291456 Sep 10 03:05 mybackup-partsae +-rw-r--r--. 1 root root 6291456 Sep 10 03:05 mybackup-partsaf +-rw-r--r--. 1 root root 637219 Sep 10 03:05 mybackup-partsag +[root@linuxtechi ~]# +``` + +Now we can move these files into another server over the network and then we can merge all the files into a single tar compressed file using below mentioned command. + +``` +[root@linuxtechi ~]# cat mybackup-partsa* > mybackup-2016-09-09.tgz +[root@linuxtechi ~]# +``` + +That’s all, hope you like different examples of tar command. Please share your feedback and comments. + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/17-tar-command-examples-in-linux/ + +作者:[Pradeep Kumar ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linuxtechi.com/author/pradeep/ diff --git a/sources/tech/20160912 15 Top Open Source Artificial Intelligence Tools.md b/sources/tech/20160912 15 Top Open Source Artificial Intelligence Tools.md new file mode 100644 index 0000000000..56f78f84b9 --- /dev/null +++ b/sources/tech/20160912 15 Top Open Source Artificial Intelligence Tools.md @@ -0,0 +1,125 @@ +15 Top Open Source Artificial Intelligence Tools +==== + +Artificial Intelligence (AI) is one of the hottest areas of technology research. Companies like IBM, Google, Microsoft, Facebook and Amazon are investing heavily in their own R&D, as well as buying up startups that have made progress in areas like machine learning, neural networks, natural language and image processing. Given the level of interest, it should come as no surprise that a recent [artificial intelligence report][1] from experts at Stanford University concluded that "increasingly useful applications of AI, with potentially profound positive impacts on our society and economy are likely to emerge between now and 2030." + +In a recent [article][2], we provided an overview of 45 AI projects that seem particularly promising or interesting. In this slideshow, we're focusing in on open source artificial intelligence tools, with a closer look at fifteen of the best-known open source AI projects. + +![](http://www.datamation.com/imagesvr_ce/5668/00AI.jpg) + +Open Source Artificial Intelligence + +These open source AI applications are on the cutting edge of artificial intelligence research. + +![](http://www.datamation.com/imagesvr_ce/8922/01Caffe.JPG) + +### 1. Caffe + +The brainchild of a UC Berkeley PhD candidate, Caffe is a deep learning framework based on expressive architecture and extensible code. It's claim to fame is its speed, which makes it popular with both researchers and enterprise users. According to its website, it can process more than 60 million images in a single day using just one NVIDIA K40 GPU. It is managed by the Berkeley Vision and Learning Center (BVLC), and companies like NVIDIA and Amazon have made grants to support its development. + +![](http://www.datamation.com/imagesvr_ce/1232/02CNTK.JPG) + +### 2. CNTK + +Short for Computational Network Toolkit, CNTK is one of Microsoft's open source artificial intelligence tools. It boasts outstanding performance whether it is running on a system with only CPUs, a single GPU, multiple GPUs or multiple machines with multiple GPUs. Microsoft has primarily utilized it for research into speech recognition, but it is also useful for applications like machine translation, image recognition, image captioning, text processing, language understanding and language modeling. + +![](http://www.datamation.com/imagesvr_ce/2901/03Deeplearning4j.JPG) + +### 3. Deeplearning4j + +Deeplearning4j is an open source deep learning library for the Java Virtual Machine (JVM). It runs in distributed environments and integrates with both Hadoop and Apache Spark. It makes it possible to configure deep neural networks, and it's compatible with Java, Scala and other JVM languages. + +The project is managed by a commercial company called Skymind, which offers paid support, training and an enterprise distribution of Deeplearning4j. + +![](http://www.datamation.com/imagesvr_ce/7269/04DMLT.JPG) + +### 4. Distributed Machine Learning Toolkit + +Like CNTK, the Distributed Machine Learning Toolkit (DMTK) is one of Microsoft's open source artificial intelligence tools. Designed for use in big data applications, it aims to make it faster to train AI systems. It consists of three key components: the DMTK framework, the LightLDA topic model algorithm, and the Distributed (Multisense) Word Embedding algorithm. As proof of DMTK's speed, Microsoft says that on an eight-cluster machine, it can "train a topic model with 1 million topics and a 10-million-word vocabulary (for a total of 10 trillion parameters), on a document collection with over 100-billion tokens," a feat that is unparalleled by other tools. + +![](http://www.datamation.com/imagesvr_ce/2890/05H2O.JPG) + +### 5. H20 + +Focused more on enterprise uses for AI than on research, H2O has large companies like Capital One, Cisco, Nielsen Catalina, PayPal and Transamerica among its users. It claims to make is possible for anyone to use the power of machine learning and predictive analytics to solve business problems. It can be used for predictive modeling, risk and fraud analysis, insurance analytics, advertising technology, healthcare and customer intelligence. + +It comes in two open source versions: standard H2O and Sparkling Water, which is integrated with Apache Spark. Paid enterprise support is also available. + +![](http://www.datamation.com/imagesvr_ce/1127/06Mahout.JPG) + +### 6. Mahout + +An Apache Foundation project, Mahout is an open source machine learning framework. According to its website, it offers three major features: a programming environment for building scalable algorithms, premade algorithms for tools like Spark and H2O, and a vector-math experimentation environment called Samsara. Companies using Mahout include Adobe, Accenture, Foursquare, Intel, LinkedIn, Twitter, Yahoo and many others. Professional support is available through third parties listed on the website. + +![](http://www.datamation.com/imagesvr_ce/4038/07MLlib.JPG) + +### 7. MLlib + +Known for its speed, Apache Spark has become one of the most popular tools for big data processing. MLlib is Spark's scalable machine learning library. It integrates with Hadoop and interoperates with both NumPy and R. It includes a host of machine learning algorithms for classification, regression, decision trees, recommendation, clustering, topic modeling, feature transformations, model evaluation, ML pipeline construction, ML persistence, survival analysis, frequent itemset and sequential pattern mining, distributed linear algebra and statistics. + +![](http://www.datamation.com/imagesvr_ce/839/08NuPIC.JPG) + +### 8. NuPIC + +Managed by a company called Numenta, NuPIC is an open source artificial intelligence project based on a theory called Hierarchical Temporal Memory, or HTM. Essentially, HTM is an attempt to create a computer system modeled after the human neocortex. The goal is to create machines that "approach or exceed human level performance for many cognitive tasks." + +In addition to the open source license, Numenta also offers NuPic under a commercial license, and it also offers licenses on the patents that underlie the technology. + +![](http://www.datamation.com/imagesvr_ce/99/09OpenNN.JPG) + +### 9. OpenNN + +Designed for researchers and developers with advanced understanding of artificial intelligence, OpenNN is a C++ programming library for implementing neural networks. Its key features include deep architectures and fast performance. Extensive documentation is available on the website, including an introductory tutorial that explains the basics of neural networks. Paid support for OpenNNis available through Artelnics, a Spain-based firm that specializes in predictive analytics. + +![](http://www.datamation.com/imagesvr_ce/4168/10OpenCyc.JPG) + +### 10. OpenCyc + +Developed by a company called Cycorp, OpenCyc provides access to the Cyc knowledge base and commonsense reasoning engine. It includes more than 239,000 terms, about 2,093,000 triples, and about 69,000 owl:sameAs links to external semantic data namespaces. It is useful for rich domain modeling, semantic data integration, text understanding, domain-specific expert systems and game AIs. The company also offers two other versions of Cyc: one for researchers that is free but not open source and one for enterprise use that requires a fee. + +![](http://www.datamation.com/imagesvr_ce/9761/11Oryx2.JPG) + +### 11. Oryx 2 + +Built on top of Apache Spark and Kafka, Oryx 2 is a specialized application development framework for large-scale machine learning. It utilizes a unique lambda architecture with three tiers. Developers can use Oryx 2 to create new applications, and it also includes some pre-built applications for common big data tasks like collaborative filtering, classification, regression and clustering. The big data tool vendor Cloudera created the original Oryx 1 project and has been heavily involved in continuing development. + +![](http://www.datamation.com/imagesvr_ce/7423/12.%20PredictionIO.JPG) + +### 12. PredictionIO + +In February this year, Salesforce bought PredictionIO, and then in July, it contributed the platform and its trademark to the Apache Foundation, which accepted it as an incubator project. So while Salesforce is using PredictionIO technology to advance its own machine learning capabilities, work will also continue on the open source version. It helps users create predictive engines with machine learning capabilities that can be used to deploy Web services that respond to dynamic queries in real time. + +![](http://www.datamation.com/imagesvr_ce/6886/13SystemML.JPG) + +### 13. SystemML + +First developed by IBM, SystemML is now an Apache big data project. It offers a highly-scalable platform that can implement high-level math and algorithms written in R or a Python-like syntax. Enterprises are already using it to track customer service on auto repairs, to direct airport traffic and to link social media data with banking customers. It can run on top of Spark or Hadoop. + +![](http://www.datamation.com/imagesvr_ce/5742/14TensorFlow.JPG) + +### 14. TensorFlow + +TensorFlow is one of Google's open source artificial intelligence tools. It offers a library for numerical computation using data flow graphs. It can run on a wide variety of different systems with single- or multi-CPUs and GPUs and even runs on mobile devices. It boasts deep flexibility, true portability, automatic differential capabilities and support for Python and C++. The website includes a very extensive list of tutorials and how-tos for developers or researchers interested in using or extending its capabilities. + +![](http://www.datamation.com/imagesvr_ce/9018/15Torch.JPG) + +### 15. Torch + +Torch describes itself as "a scientific computing framework with wide support for machine learning algorithms that puts GPUs first." The emphasis here is on flexibility and speed. In addition, it's fairly easy to use with packages for machine learning, computer vision, signal processing, parallel processing, image, video, audio and networking. It relies on a scripting language called LuaJIT that is based on Lua. + + + + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/slideshows/15-top-open-source-artificial-intelligence-tools.html + +作者:[Cynthia Harvey][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.datamation.com/author/Cynthia-Harvey-6460.html +[1]: https://ai100.stanford.edu/sites/default/files/ai_100_report_0906fnlc_single.pdf +[2]: http://www.datamation.com/applications/artificial-intelligence-software-45-ai-projects-to-watch-1.html diff --git a/sources/tech/20160912 8 best practices for building containerized applications.md b/sources/tech/20160912 8 best practices for building containerized applications.md new file mode 100644 index 0000000000..d67ee5c473 --- /dev/null +++ b/sources/tech/20160912 8 best practices for building containerized applications.md @@ -0,0 +1,74 @@ +8 best practices for building containerized applications +==== + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/containers_2015-2-osdc-lead.png?itok=0yid3gFY) + +Containers are a major trend in deploying applications in both public and private clouds. But what exactly are containers, why have they become a popular deployment mechanism, and how will you need to modify your application to optimize it for a containerized environment? + +### What are containers? + +The technology behind containers has a long history beginning with SELinux in 2000 and Solaris zones in 2005. Today, containers are a combination of several kernel features including SELinux, Linux namespaces, and control groups, providing isolation of end user processes, networking, and filesystem space. + +### Why are they so popular? + +The recent widespread adoption of containers is largely due to the development of standards aimed at making them easier to use, such as the Docker image format and distribution model. This standard calls for immutable images, which are the launching point for a container runtime. Immutable images guarantee that the same image the development team releases is what gets tested and deployed into the production environment. + +The lightweight isolation that containers provide creates a better abstraction for an application component. Components running in containers won't interfere with each other the way they might running directly on a virtual machine. They can be prevented from starving each other of system resources, and unless they are sharing a persistent volume won't block attempting to write to the same files. Containers have helped to standardize practices like logging and metric collection, and they allow for increased multi-tenant density on physical and virtual machines, all of which leads to lower deployment costs. + +### How do you build a container-ready application? + +Changing your application to run inside of a container isn't necessarily a requirement. The major Linux distributions have base images that can run anything that runs on a virtual machine. But the general trend in containerized applications is following a few best practices: + +- 1. Instances are disposable + +Any given instance of your application shouldn't need to be carefully kept running. If one system running a bunch of containers goes down, you want to be able to spin up new containers spread out across other available systems. + +- 2. Retry instead of crashing + +When one service in your application depends on another service, it should not crash when the other service is unreachable. For example, your API service is starting up and detects the database is unreachable. Instead of failing and refusing to start, you design it to retry the connection. While the database connection is down the API can respond with a 503 status code, telling the clients that the service is currently unavailable. This practice should already be followed by applications, but if you are working in a containerized environment where instances are disposable, then the need for it becomes more obvious. + +- 3. Persistent data is special + +Containers are launched based on shared images using a copy-on-write (COW) filesystem. If the processes the container is running choose to write out to files, then those writes will only exist as long as the container exists. When the container is deleted, that layer in the COW filesystem is deleted. Giving a container a mounted filesystem path that will persist beyond the life of the container requires extra configuration, and extra cost for the physical storage. Clearly defining the abstraction for what storage is persisted promotes the idea that instances are disposable. Having the abstraction layer also allows a container orchestration engine to handle the intricacies of mounting and unmounting persistent volumes to the containers that need them. + +- 4. Use stdout not log files + +You may now be thinking, if persistent data is special, then what do I do with log files? The approach the container runtime and orchestration projects have taken is that processes should instead [write to stdout/stderr][1], and have infrastructure for archiving and maintaining [container logs][2]. + +- 5. Secrets (and other configurations) are special too + +You should never hard-code secret data like passwords, keys, and certificates into your images. Secrets are typically not the same when your application is talking to a development service, a test service, or a production service. Most developers do not have access to production secrets, so if secrets are baked into the image then a new image layer will have to be created to override the development secrets. At this point, you are no longer using the same image that was created by your development team and tested by quality engineering (QE), and have lost the benefit of immutable images. Instead, these values should be abstracted away into environment variables or files that are injected at container startup. + +- 6. Don't assume co-location of services + +In an orchestrated container environment you want to allow the orchestrator to send your containers to whatever node is currently the best fit. Best fit could mean a number of things: it could be based on whichever node has the most space right now, the quality of service the container is requesting, whether the container requires persistent volumes, etc. This could easily mean your frontend, API, and database containers all end up on different nodes. While it is possible to force an API container to each node (see [DaemonSets][3] in Kubernetes), this should be reserved for containers that perform tasks like monitoring the nodes themselves. + +- 7. Plan for redundancy / high availability + +Even if you don't have enough load to require an HA setup, you shouldn't write your service in a way that prevents you from running multiple copies of it. This will allow you to use rolling deployments, which make it easy to move load off one node and onto another, or to upgrade from one version of a service to the next without taking any downtime. + +- 8. Implement readiness and liveness checks + +It is common for applications to have startup time before they are able to respond to requests, for example, an API server that needs to populate in-memory data caches. Container orchestration engines need a way to check that your container is ready to serve requests. Providing a readiness check for new containers allows a rolling deployment to keep an old container running until it is no longer needed, preventing downtime. Similarly, a liveness check is a way for the orchestration engine to continue to check that the container is in a healthy state. It is up to the application creator to decide what it means for their container to be healthy, or "live". A container that is no longer live will be killed, and a new container created in its place. + +### Want to find out more? + +I'll be at the Grace Hopper Celebration of Women in Computing in October, come check out my talk: [Containerization of Applications: What, Why, and How][4]. Not headed to GHC this year? Then read on about containers, orchestration, and applications on the [OpenShift][5] and [Kubernetes][6] project sites. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/life/16/9/8-best-practices-building-containerized-applications + +作者:[Jessica Forrester ][a] +译者:[译者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/jwforres +[1]: https://docs.docker.com/engine/reference/commandline/logs/ +[2]: http://kubernetes.io/docs/getting-started-guides/logging/ +[3]: http://kubernetes.io/docs/admin/daemons/ +[4]: https://www.eiseverywhere.com/ehome/index.php?eventid=153076&tabid=351462&cid=1350690&sessionid=11443135&sessionchoice=1& +[5]: https://www.openshift.org/ +[6]: http://kubernetes.io/ diff --git a/sources/tech/20160912 Content Security Policy, Your Future Best Friend.md b/sources/tech/20160912 Content Security Policy, Your Future Best Friend.md new file mode 100644 index 0000000000..80f435bd4e --- /dev/null +++ b/sources/tech/20160912 Content Security Policy, Your Future Best Friend.md @@ -0,0 +1,257 @@ +Content Security Policy, Your Future Best Friend +===== + +A long time ago, my personal website was attacked. I do not know how it happened, but it happened. Fortunately, the damage from the attack was quite minor: A piece of JavaScript was inserted at the bottom of some pages. I updated the FTP and other credentials, cleaned up some files, and that was that. + +One point made me mad: At the time, there was no simple solution that could have informed me there was a problem and — more importantly — that could have protected the website’s visitors from this annoying piece of code. + +A solution exists now, and it is a technology that succeeds in both roles. Its name is content security policy (CSP). + +### What Is A CSP? Link + +The idea is quite simple: By sending a CSP header from a website, you are telling the browser what it is authorized to execute and what it is authorized to block. + +Here is an example with PHP: + +``` +"); +?> +``` + +#### SOME DIRECTIVES LINK + +You may define global rules or define rules related to a type of asset: + +``` +default-src 'self' ; + # self = same port, same domain name, same protocol => OK +``` + +The base argument is default-src: If no directive is defined for a type of asset, then the browser will use this value. + +``` +script-src 'self' www.google-analytics.com ; + # JS files on these domains => OK +``` + +In this example, we’ve authorized the domain name www.google-analytics.com as a source of JavaScript files to use on our website. We’ve added the keyword 'self'; if we redefined the directive script-src with another rule, it would override default-src rules. + +If no scheme or port is specified, then it enforces the same scheme or port from the current page. This prevents mixed content. If the page is https://example.com, then you wouldn’t be able to load http://www.google-analytics.com/file.js because it would be blocked (the scheme wouldn’t match). However, there is an exception to allow a scheme upgrade. If http://example.com tries to load https://www.google-analytics.com/file.js, then the scheme or port would be allowed to change to facilitate the scheme upgrade. + +``` +style-src 'self' data: ; + # Data-Uri in a CSS => OK +``` + +In this example, the keyword data: authorizes embedded content in CSS files. + +Under the CSP level 1 specification, you may also define rules for the following: + +- `img-src` + +valid sources of images + +- `connect-src` + +applies to XMLHttpRequest (AJAX), WebSocket or EventSource + +- `font-src` + +valid sources of fonts + +- `object-src` + +valid sources of plugins (for example, `, , `) + +- `media-src` + +valid sources of `