Tuesday, 27 January 2015

Show all the open windows preview in Ubuntu

Many people like the fancy feature in Mac OSX that user can show all the open windows preview, actually Ubuntu can do that also, just:

Super+W 

can do it exactly like Mac OSX.

Here is my print screen shows the fancy showing all the open windows preview in Ubuntu.



In case if you want to add Mouse Gestures to it, Like Gnome 3 you can do the following:
(as pointed out in comments)
  • Install Compiz Settings Manager
  • Run it, Go to Commands under General
  • Set Command 0 in Edge Bindings and come back to "Command" tab
  • Enter "xdotool key Super_L+w" in Command Line 0
  • Install package xdotool


    That's how it looks like in Gnome3, move your mouse to the corner and it will show up!

Wednesday, 14 January 2015

韩国泡菜

隔壁搬来个漂亮的韩国妹妹,在她家里吃了不少韩国的好吃的,不过最好吃的还是韩国
泡菜,我的最爱。她虽然是出生成长在美国,可是饮食习惯还是很韩国化,她说她一天
不吃韩国泡菜,就浑身发痒,哈哈。
图片里的很多东西用带子装起来,是因为我家小朋友很怕打汁机的声音,所以打碎的步
骤是韩国妹妹在自己家里做好的,用带子装起来。
材料:
白菜: 6棵
萝卜:3根
大蒜沫:1cup
姜沫:1/3cup
洋葱:2个、
苹果:0.5个
糖:3cup
shrimp paste:8 tbsp
韩国辣椒粉(细):2cups
韩国辣椒粉(粗):1cup
鱼露:8cups(如果你比较喜欢吃咸,可以在多加两勺)
红心萝卜:切成细丝 1-1/2cups
胡萝卜:切成细丝 1-1/2cups
葱:5根 切段
青辣椒:5根 切片
糯米粉: 200克
手套:在白菜上涂辣椒糊用
辣椒糊的做法:
1)盛凉水在锅里,然后放入糯米粉,搅匀,开中火。持续搅拌,开锅冒泡后关火。
2)将红(白)萝卜,胡萝卜切丝,长辣椒切薄片。
3)洋葱,萝卜放入料理机打成细泥。
4)大蒜和姜切细粒。
5)将韩国辣椒面(细)放入锅中,搅拌均匀,然后再加入粗粒辣椒,搅拌
6)将洋葱苹果泥,大蒜姜粒,shrimp paste,糖,鱼露,葱放入糯米糊中搅拌。
7)一头大蒜,一个韩国梨,半个萝卜,一个洋葱,一点点姜(非常少),放入搅拌机
,打碎后滤去渣,留下汁水,倒入糯米糊
中。(韩国妹妹说这个是她妈妈的秘方)
白菜的做法:
1)整棵白菜切成四瓣,厨房的水池里接一池水,然后把切好的白菜泡进去。泡大概20
分钟,然后取出泡在最下面的白菜,放在准比好的大箱子里(或者大盆)开始摸盐。盐
需要海盐,每一片叶子都需要涂抹,白菜帮的部分相对的涂多一些。萝卜切块,不用单
独摸盐,直接放在箱子的缝隙中。所有的白菜涂好盐后,拿一把海盐,放入一些水(不
用太多)把海盐溶化,然后把盐水倒入白菜中。找重物压在白菜上,3个小时后,把压
在底部的白菜和顶部的对调一下,用重物继续压2个小时。
2)把压去水分的白菜取出,用力挤去水分,白菜头的部分,用刀切去,这个部分如果
不切掉的话,会影响泡菜的味道。
3)取一个挤去水分的白菜,把做好的辣椒酱,均匀的涂在每一片白菜叶上,白菜帮的
部位要多涂一些,涂好后,用手稍微挤一下,然后放入装韩国泡菜的小箱子。我用的这
个小箱子,是在韩国超市买的,专门用来做韩国泡菜的,密封很好,如果没有韩国超市
,找个密封写的罐子也一样。
4)萝卜用辣椒酱抓一抓,然后发仔白菜中,基本上铺两三层白菜,就放一层萝卜。
5)做好的泡菜,放在小箱子的密封,室温放3天。3天后开盖子,这个时候有很多的水
和起跑,用筷子或者用的顺手的东西吧泡菜大概的翻一下,叫里面的气泡跑出来,然后
用力把白菜往下压,直到气泡消失。放入冰箱,两周后可以开吃了。

Tuesday, 6 January 2015

AnalyzeCovariates Plots Debug

 I didn't instal the packages of, ggplots, gplots, reshape, gsalib... etc that cause the problem.

Tag="aeae57931b40423fc3f02f707f5f9959", Date=Mon Jan 05 17:36:51 EST 2015, Content-Length=766, id-2=wUztIXs8dWN7HhoGFOSmqkc0BisAB7s3TiSzCCddguJqFMHI8p6VPE20UxCY8LZu, request-id=D5FB8DEBED8D617D, Content-MD5=rq5XkxtAQj/D8C9wf1+ZWQ==, Content-Type=application/octet-stream}]
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR stack trace
org.broadinstitute.gatk.utils.R.RScriptExecutorException: RScript exited with 1
at org.broadinstitute.gatk.utils.R.RScriptExecutor.exec(RScriptExecutor.java:174)
at org.broadinstitute.gatk.utils.recalibration.RecalUtils.generatePlots(RecalUtils.java:576)
at org.broadinstitute.gatk.tools.walkers.bqsr.AnalyzeCovariates.generatePlots(AnalyzeCovariates.java:380)
at org.broadinstitute.gatk.tools.walkers.bqsr.AnalyzeCovariates.initialize(AnalyzeCovariates.java:394)
at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:83)
at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:314)
at org.broadinstitute.gatk.engine.CommandLineExecutable.execute(CommandLineExecutable.java:121)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:248)
at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start(CommandLineProgram.java:155)
at org.broadinstitute.gatk.engine.CommandLineGATK.main(CommandLineGATK.java:107)
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A GATK RUNTIME ERROR has occurred (version 3.2-2-gec30cee):
##### ERROR
##### ERROR This might be a bug. Please check the documentation guide to see if this is a known problem.
##### ERROR If not, please post the error message, with stack trace, to the GATK forum.
##### ERROR Visit our website and forum for extensive documentation and answers to
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR MESSAGE: RScript exited with 1

Saturday, 3 January 2015

你会做Web上的用户登录功能吗?

Web上的用户登录功能应该是最基本的功能了,可是在我看过一些站点的用户登录功能后,我觉得很有必要写一篇文章教大家怎么来做用户登录功能。下面 的文章告诉大家这个功能可能并没有你所想像的那么简单,这是一个关系到用户安全的功能,希望大家能从下面的文章中能知道什么样的方法才是一个好的用户登录 功能。以下内容,转载时请保持原文一致,并请注明作者和出处

用户名和口令

首先,我们先来说说用户名和口令的事。这并不是本站第一次谈论这个事了。如何管理自己的口令让你知道怎么管理自己的口令,破解你的口令让你知道在现代这样速度的计算速度下,用穷举法破解你的口令可能会是一件很轻松的事。在这里我想告诉从开发者的角度上来做设计这个用户名和口令的事。下面一几件规则:
  • 限制用户输入一些非常容易被破解的口令。如什么qwert,123456, password之类,就像twitter限制用户的口令一样做一个口令的黑名单。另外,你可以限制用户口令的长度,是否有大小写,是否有数字,你可以用你的程序做一下校验。当然,这可能会让用户感到很不爽,所以,现在很多网站都提供了UX让用户知道他的口令强度是什么样的(比如这个有趣的UX),这样可以让用户有一个选择,目的就是告诉用户——要想安全,先把口令设得好一点。
  • 千万不要明文保存用户的口令。正如如何管理自己的口令所 说的一样,很多时候,用户都会用相同的ID相同的口令来登录很多网站。所以,如果你的网站明文保存的话,那么,如果你的数据被你的不良员工流传出去那对用 户是灾难性的。所以,用户的口令一定要加密保存,最好是用不可逆的加密,如MD5或是SHA1之类的有hash算法的不可逆的加密算法。CSDN曾明文保 存过用户的口令。(另,对于国内公司的品行以及有关部门的管理方式,我不敢保证国内网站以加密的方式保存你的口令。我觉得,做为一个有良知的人,我们应该 加密保存用户的口令)
  • 是否让浏览器保存口令。 我们有N多的方法可以不让浏览器保存用户名和口令。但是这可能对用户来说很不爽。因为在真实世界里谁也记得不住那么多的口令。很多用户可能会使用一些密码 管理工具来保存密码,浏览器只是其中一种。是否让浏览器保存这个需要你做决定,重点是看一下你的系统的安全级别是否要求比较高,如果是的话,则不要让浏览 器保存密码,并在网站明显的位置告诉用户——保存口令最安全的地方只有你的大脑。
  • 口令在网上的传输。因为HTTP是明文协议,所以,用户名和口令在网上也是明文发送的,这个很不安全。你可以看看这篇文章你 就明白了。要做到加密传输就必需使用HTTPS协议。但是,在中国还是有很多网站的Web登录方式还在使用ActiveX控件,这可能成为IE6还大量存 在的原因。我通常理解为这些ActiveX控件是为了反键盘记录程序的。 不过,我依然觉ActiveX控件不应该存在,因为在国外的众多安全很重要的站点上都看不到ActiveX的控件的身影。

用户登录状态

首先,我想告诉大家的是,因为HTTP是无状态的协议,也就是说,这个协议是无法记录用户访问状态的,其每次请求都是独立的无关联的,一笔是一笔。 而我们的网站都是设计成多个页面的,所在页面跳转过程中我们需要知道用户的状态,尤其是用户登录的状态,这样我们在页面跳转后我们才知道是否可以让用户有 权限来操作一些功能或是查看一些数据。
所以,我们每个页面都需要对用户的身份进行认证。当然,我们不可能让用户在每个页面上输入用户名和口令,这会让 用户觉得我们的网站相当的SB。为了实现这一功能,用得最多的技术就是浏览器的cookie,我们会把用户登录的信息存放在客户端的cookie里,这 样,我们每个页面都从这个cookie里获得用户是否登录的信息,从而达到记录状态,验证用户的目的。但是,你真的会用cookie吗?下面是使用 cookie的一些原则。
  • 千万不要在cookie中存放用户的密码。加密的密码都不行。因为这个密码可以被人获取并尝试离线穷举。所以,你一定不能把用户的密码保存在cookie中。我看到太多的站点这么干了。
  • 正确设计“记住密码”。这个功能简直就是一个安全隐患,我觉得并不是所有的程序员都知道怎么设计这个事。一般 的设计 是——一时用户勾选了这个功能,系统会生成一个cookie,cookie包括用户名和一个固定的散列值,这个固定的散列值一直使用。这样,你就可以在所 有的设备和客户上都可以登录,而且可以有多个用户同时登录。这个并不是很安全。下面是一些更为安全的方法供你参考:
    (——更新 2011/08/26,原文中有些小错误,并且说的不清楚,重新调整了一下——
1)在cookie中,保存三个东西——用户名登录序列登录token
用户名:明文存放。
登录序列:一个被MD5散列过的随机数,仅当强制用户输入口令时更新(如:用户修改了口令)
登录token:一个被MD5散列过的随机数,仅一个登录session内有效,新的登录session会更新它
2)上述三个东西会存在服务器上,服务器的验证用户需要验证客户端cookie里的这三个事。
3)这样的设计会有什么样的效果,会有下面的效果,
a)登录token是单实例登录。意思就是一个用户只能有一个登录实例。
b)登录序列是用来做盗用行为检测的。如果用户的cookie被盗后,盗用者使用这个cookie访问网站时,我们的系统是以为是合法用户,然后更新“登录token”,而真正的用户回来访问时,系统发现只有“用户名”和“登录序列”相同,但是“登录token” 不对,这样的话,系统就知道,这个用户可能出现了被盗用的情况,于是,系统可以清除并更改登录序列  登录token,这样就可以令所有的cookie失效,并要求用户输入口令。并给警告用户系统安全。
4)当然,上述这样的设计还是会有一些问题,比如:同一用户的不同设备登录,甚至在同一个设备上使用不同的浏览器保登录。一个设备会让另一个设备的登录token登录序列失效,从而让其它设备和浏览器需要重新登录,并会造成cookie被盗用的假象。所以,你在服务器服还需要考虑- IP 地址
a) 如果以口令方式登录,我们无需更新服务器的“登录序列”和 “登录token”(但需要更新cookie)。因为我们认为口令只有真正的用户知道。
b) 如果 IP相同 ,那么,我们无需更新服务器的“登录序列”和 “登录token”(但需要更新cookie)。因为我们认为是同一用户有同一IP(当然,同一个局域网里也有同一IP,但我们认为这个局域网是用户可以控制的。网吧内并不推荐使用这一功能)。
c) 如果 (IP不同 && 没有用口令登录),那么,“登录token” 就会在多个IP间发生变化(登录token在两个或多个ip间被来来回回的变换),当在一定时间内达到一定次数后,系统才会真正觉得被盗用的可能性很高,此时系统在后台清除“登录序列”和“登录token“,让Cookie失效,强制用户输入口令(或是要求用户更改口令),以保证多台设备上的cookie一致。
  • 不要让cookie有权限访问所有的操作。否则就是XSS攻击,这个功能请参看新浪微博的XSS攻击。下面的这些功能一定要用户输入口令:
1)修改口令。
2)修改电子邮件。(电子邮件通常用来找回用户密码,最好通发邮件或是发手机短信的方式修改,或者干脆就不让改一一用电子邮件做帐号名)
3)用户的隐私信息。
4)用户消费功能。
  • 权衡Cookie的过期时间。如果是永不过期,会有很不错的用户体验,但是这也会让用户很快就忘了登录密码。 如果设置上过期期限,比如2周,一个月,那么可能会好一点,但是2周和一个月后,用户依然会忘了密码。尤其是用户在一些公共电脑上,如果保存了永久 cookie的话,等于泄露了帐号。所以,对于cookie的过期时间我们还需要权衡。

找回口令的功能

找回口令的功能一定要提供。但是很多朋友并不知道怎么来设计这个功能。我们有很多找回口令的设计,下面我逐个点评一下。
  • 千万不要使用安全问答。事实证明,这个环节很烦人,而且用户并不能很好的设置安全问答。什么,我的生日啊,我 母亲的生日,等等。因为今天的互联网和以前不一样了,因为SNS,今天的互联比以前更真实了,我可以上facebook,开心,人人网,LinkedIn 查到你的很多的真实的信息。通过这些信息我可以使用安全问答来重设你的口令。 这里需要说一下 Facebook,Facebook的安全问答很强大,还要你通过照片认人,呵呵。
  • 不要重置用户的密码。因为这有可能让用户的密码遭到恶意攻击。当然,你要发个邮件给用户让其确认,用户点击邮 件中的一个链接,你再重置。我并不推荐这样的方法,因为用户一般都会用笔记下来这个很难记的口令,然后登录系统,因为登录系统时使用了“记住密码”的功 能,所以导致用户不会去修改密码,从而要么导到被写下来的密码被人盗取,要么又忘记了密码。
  • 好一点的做法——通过邮件自行重置。当用户申请找回口令功能的时候,系统生成一个MD5唯一的随机字串(可通 过UID+IP+timestamp+随机数),放在数据库中,然后设置上时限(比如1小时内),给用户发一个邮件,这个连接中包含那个MD5的字串的链 接,用户通过点击那个链接来自己重新设置新的口令。
  • 更好一点的做法——多重认证。比如:通过手机+邮件的方式让用户输入验证码。手机+邮件可能还不把握,因为手机要能会丢了,而我的手机可以访问我的邮箱。所以,使用U盾,SecureID(一个会变化的6位数token),或是通过人工的方式核实用户身份。当然,这主要看你的系统的安全级别了。

口令探测防守

  • 使用验证码。验证码是后台随机产生的一个短暂的验证码,这个验证码一般是一个计算机很难识别的图片。这样就可 以防止以程序的方式来尝试用户的口令。事实证明,这是最简单也最有效的方式。当然,总是让用户输入那些肉眼都看不清的验证码的用户体验不好,所以,可以折 中一下。比如Google,当他发现一个IP地址发出大量的搜索后,其会要求你输入验证码。当他发现同一个IP注册了3个以上的gmail邮箱后,他需要 给你发短信方式或是电话方式的验证码。
  • 用户口令失败次数。调置口令失败的上限,如果失败过多,则把帐号锁了,需要用户以找回口令的方式来重新激活帐号。但是,这个功能可能会被恶意人使用。最好的方法是,增加其尝试的时间成本(以前的这篇文章说过一个增加时间成本的解密算法)。如,两次口令尝试的间隔是5秒钟。三次以上错误,帐号被临时锁上30秒,5次以上帐号被锁1分钟,10次以上错误帐号被锁4小时……但是这会导致恶意用户用脚本来攻击,所以最好再加上验证码,验证码出错次数过多不禁止登录而是禁lP。
  • 系统全局防守。上述的防守只针对某一个别用户。恶意者们深知这一点,所以,他们一般会动用“僵尸网络”轮着尝 试一堆用户的口令,所以上述的那种方法可能还不够好。我们需要在系统全局域上监控所有的口令失败的次数。当然,这个需要我们平时没有受到攻击时的数据做为 支持。比如你的系统,平均每天有5000次的口令错误的事件,那么你可以认为,当口令错误大幅超过这个数后,而且时间相对集中,就说明有黑客攻击。这个时 候你怎么办?一般最常见使用的方法是让所有的用户输错口令后再次尝试的时间成本增加。
最后,再说一下,关于用户登录,使用第三方的 OAuth 和 OpenID 也不失为一个很不错的选择。

参考文章

以上内容,转载coolshell

Tuesday, 16 December 2014

大数据

(导读)科技的进步在很多的时候总会超出我们的想象,如果未来我们一个人拥有的电脑设备超过现在全球现在计算能力的总和,一个人产生的数据量超过现 在全球数据量的总和,甚至你的宠物小狗产生的信息量都超过现在全球数据量的总和,世界会发生什么呢?阅读本文,大数据(Big Data)会告诉你一个充满奇幻色彩的世界。

一、详解时髦词汇:大数据
似乎一夜之间,大数据(Big Data)变成一个IT行业中最时髦的词汇。
首先,大数据不是什么完完全全的新生事物,Google的搜索服务就是一个典型的大数据运用,根据客户的需求,Google实时从全球海量的数字资产(或 数字垃圾)中快速找出最可能的答案,呈现给你,就是一个最典型的大数据服务。只不过过去这样规模的数据量处理和有商业价值的应用太少,在IT行业没有形成 成型的概念。现在随着全球数字化、网络宽带化、互联网应用于各行各业,累积的数据量越来越大,越来越多企业、行业和国家发现,可以利用类似的技术更好地服 务客户、发现新商业机会、扩大新市场以及提升效率,才逐步形成大数据这个概念。
有一个有趣的故事是关于奢侈品营销的。PRADA在纽约的旗舰店中每件衣服上都有RFID码。每当一个顾客拿起一件PRADA进试衣间,RFID会被自动 识别。同时,数据会传至PRADA总部。每一件衣服在哪个城市哪个旗舰店什么时间被拿进试衣间停留多长时间,数据都被存储起来加以分析。如果有一件衣服销 量很低,以往的作法是直接干掉。但如果RFID传回的数据显示这件衣服虽然销量低,但进试衣间的次数多。那就能另外说明一些问题。也许这件衣服的下场就会 截然不同,也许在某个细节的微小改变就会重新创造出一件非常流行的产品。
从这个案例来看,大数据并不是很神奇的事情。就如同电影《永无止境》提出的问题:人类通常只使用了20%的大脑,如果剩余80%大脑潜能被激发出来,世界 会变得怎样?在企业、行业和国家的管理中,通常只有效使用了不到20%的数据(甚至更少),如果剩余80%数据的价值激发起来,世界会变得怎么样呢?特别 是随着海量数据的新摩尔定律,数据爆发式增长,然后数据又得到更有效应用,世界会怎么样呢?
单个的数据并没有价值,但越来越多的数据累加,量变就会引起质变,就好像一个人的意见并不重要,但1千人、1万人的意见就比较重要,上百万人就足以掀起巨大的波澜,上亿人足以改变一切。
中国的航班晚点非常多,相比之下美国航班准点情况好很多。这其中,美国航空管制机构一个的好做法发挥了积极的作用,说起来也非常简单,就是美国会公布每个 航空公司、每一班航空过去一年的晚点率和平均晚点时间,这样客户在购买机票的时候就很自然会选择准点率高的航班,从而通过市场手段牵引各航空公司努力提升 准点率。这个简单的方法比任何管理手段都直接和有效。
没有整合和挖掘的数据,价值也呈现不出来。《永无止境》中的库珀如果不能把海量信息围绕某个公司的股价整合起来、串联起来,这些信息就没有价值。
因此,海量数据的产生、获取、挖掘及整合,使之展现出巨大的商业价值,这就是我理解的大数据。在互联网对一切重构的今天,这些问题都不是问题。因为,大数 据是互联网深入发展的下一波应用,是互联网发展的自然延伸。目前,可以说大数据的发展到了一个临界点,因此才成为IT行业中最热门的词汇之一。
二、大数据将重构很多行业的商业思维和商业模式
我想以对未来汽车行业的狂野想象来展开这个题目。
在人的一生中,汽车是一项巨大的投资。以一部30万车、7年换车周期来算,每年折旧费4万多(这里还不算资金成本),加上停车、保险、油、维修、保养等各项费用,每年耗费应在6万左右。汽车产业也是一个很长产业链的龙头产业,这个方面只有房地产可以媲美。
但同时,汽车产业链是一个低效率、变化慢的产业。汽车一直以来就是四个轮子、一个方向盘、两排沙发(李书福语)。这么一个昂贵的东西,围绕车产生的数据却少的可怜,行业产业链之间几无任何数据传递。
我们在这里狂野地想象一番,如果将汽车全面数字化,都大数据了,会产生什么结果?
有些人说,汽车数字化,不就是加个MBB模块吗?不,这太小儿科了。在我理想中,数字化意味着汽车可以随时联上互联网,意味着汽车是一个大型计算系统加上 传统的轮子、方向盘和沙发,意味着可以数字化导航、自动驾驶,意味着你和汽车相关的每一个行动都数字化,包括每一次维修、每一次驾驶路线、每一次事故的录 像、每一天汽车关键部件的状态,甚至你的每一个驾驶习惯(如每一次的刹车和加速)都记录在案。这样,你的车每月甚至每周都可能产生T比特的数据。
好了,我们假设这些数据都可以存储并分享给相关的政府、行业和企业。这里不讨论隐私问题带来的影响,假设在隐私保护的前提下,数据可以自由分享。
那么,保险公司会怎么做呢?保险公司把你的所有数据拿过去建模分析,发现几个重要的事实:一是你开车主要只是上下班,南山到坂田这条线路是非繁华路线,红 绿灯很少,这条路线过去一年统计的事故率很低;你的车况(车的使用年限、车型)好,此车型在全深圳也是车祸率较低;甚至统计你的驾驶习惯,加油平均,临时 刹车少,超车少,和周围车保持了应有的车距,驾驶习惯好。最后结论是你车型好,车况好,驾驶习惯好,常走的线路事故率低,过去一年也没有出过车祸,因此可 以给予更大幅度的优惠折扣。这样保险公司就完全重构了它的商业模式了。在没有大数据支撑之前,保险公司只把车险客户做了简单的分类,一共分为四种客户,第 一种是连续两年没有出车祸的,第二种过去一年没有出车祸,第三种过去一年出了一次车祸,第四种是过去一年出了两次及以上车祸的,就四种类型。在大数据的支 持下,保险公司可以真正以客户为中心,把客户分为成千上万种,每个客户都有个性化的解决方案,这样保险公司经营就完全不同,对于风险低的客户敢于大胆折 扣,对于风险高的客户报高价甚至拒绝,一般的保险公司就完全难以和这样的保险公司竞争了。拥有大数据并使用大数据的保险公司比传统公司将拥有压倒性的竞争 优势,大数据将成为保险公司最核心的竞争力,因为保险就是一个基于概率评估的生意,大数据对于准确评估概率毫无疑问是最有利的武器,而且简直是量身定做的 武器。
在大数据的支持下,4S店的服务也完全不同了。车况信息会定期传递到4S店,4S店会根据情况及时提醒车主及时保养和维修,特别是对于可能危及安全的问题,在客户同意下甚至会采取远程干预措施,同时还可以提前备货,车主一到4S店就可以维修而不用等待。
对于驾驶者来说,不想开车的时候,在大数据和人工智能的支持下,车辆可以自动驾驶,并且对于你经常开的线路可以自学习自优化。谷歌的自动驾驶汽车,为了对 周围环境作出预测,每秒钟要收集差不多1GB的数据,没有大数据的支持,自动驾驶是不可想象的;在和周围车辆过近的时候,会及时提醒车主避让;上下班的时 候,会根据实时大数据情况,对于你经常开车的线路予以提醒,绕开拥堵点,帮你选择最合适的线路;到城市中心,寻找车位是一件很麻烦的事情,但未来你可以到 了商场门口后,让汽车自己去找停车位,等想要回程的时候,提前通知让汽车自己开过来接。
车辆是城市最大最活跃的移动物体,是拥堵的来源,也是最大的污染来源之一。数字化的车辆、大数据应用将带来很多的改变。红绿灯可以自动优化,根据不同道路 的拥堵情况自动进行调整,甚至在很多地方可以取消红绿灯;城市停车场也可以大幅度优化,根据大数据的情况优化城市停车位的设计,如果配合车辆的自动驾驶功 能,停车场可以革命性演变,可以设计专门为自动驾驶车辆的停车楼,地下、地上楼层可以高达几十层,停车楼层可以更矮,只要能高于车高度即可(或者把车竖起 来停),这样将对城市规划产生巨大的影响;政府还可以每年公布各类车型的实际排污量、税款、安全性等指标,鼓励民众买更节能、更安全的车。
电子商务和快递业也可能发生巨大的变化。运快递的车都可以自动驾驶,不用赶白天的拥堵的道路,晚上半夜开,在你家门口设计自动接收箱,通过密码开启自动投递进去,就好像过去报童投报一样。
这么想象下来,我认为,汽车数字化、互联网化、大数据应用、人工智能,将对汽车业及相关的长长的产业链产生难以想象的巨大变化和产业革命,具有无限的想象 空间,可能完全被重构。当然,要实现我所描述的场景,估计至少50年、100年之后的事情了,估计我这辈子是看不到的。
在这个章节的最后,我想总结一下自己对大数据的看法。
第一,大数据使企业真正有能力从以自我为中心改变为以客户为中心。企业是为客户而生,目的是为股东获得利润。只有服务好客户,才能获得利润。大数据的使用 能够使对企业的经营对象从客户的粗略归纳(就是所谓提炼归纳的“客户群”)还原成一个个活生生的客户,这样经营就有针对性,对客户的服务就更好,投资效率 就更高。
第二,大数据一定程度上将颠覆了企业的传统管理方式。现代企业的管理方式是来源于对军队的模仿,依赖于层层级级的组织和严格的流程,依赖信息的层层汇集、 收敛来制定正确的决策,再通过决策在组织的传递与分解,以及流程的规范,确保决策得到贯彻,确保每一次经营活动都有质量保证,也确保一定程度上对风险的规 避。
第三,大数据另外一个重大的作用是改变了商业逻辑,提供了从其他视角直达答案的可能性。现在人的思考或者是企业的决策,事实上都是一种逻辑的力量在主导起 作用。大数据给了我们其他的选择,就是利用数据的力量,直接获得答案。就好像我们学习数学,小时候学九九乘法表,中学学几何,大学还学微积分,碰到一道难 题,我们是利用了多年学习沉淀的经验来努力求解,但我们还有一种方法,在网上直接搜索是不是有这样的题目,如果有,直接抄答案就好了。很多人就会批评说, 这是抄袭,是作弊。但我们为什么要学习啊?不就是为了解决问题嘛。
第四,通过大数据,我们可能有全新的视角来发现新的商业机会和重构新的商业模式。我们现在看这个世界,比如分析家中食品腐败,主要就是依赖于我们的眼睛再 加上我们的经验,但如果我们有一台显微镜,我们一下就看到坏细菌,那么分析起来完全就不一样了。大数据就是我们的显微镜,它可以让我们从全新视角来发现新 的商业机会,并可能重构商业模型。我们的产品设计可能不一样了,很多事情不用猜了,客户的习惯和偏好一目了然,我们的设计就能轻易命中客户的心窝;我们的 营销也完全不同了,我们知道客户喜欢什么、讨厌什么,更有针对性。特别是显微镜再加上广角镜,我们就有更多全新的视野了。这个广角镜就是跨行业的数据流 动,使我们过去看不到的东西都能看到了。
最后一点,我想谈的是大数据发展对IT本身技术架构的革命性影响。大数据的根基是IT系统。我们现代企业的IT系统基本上是建立在IOE(IBM小型机、 Oracle数据库、EMC存储)+Cisco模型基础上的,这样的模型是Scale-UP型的架构,在解决既定模型下一定数据量的业务流程是适配的,但 如果是大数据时代,很快会面临成本、技术和商业模式的问题,大数据对IT的需求很快就会超越了现有厂商架构的技术顶点,超大数据增长将带来IT支出增长之 间的线性关系,使企业难以承受。因此,目前在行业中提出的去IOE趋势,利用Scale-out架构+开源软件对Scale-up架构+私有软件的取代, 本质是大数据业务模型所带来的,也就是说大数据将驱动IT产业新一轮的架构性变革。去IOE潮流中的所谓国家安全因素,完全是次要的。
所以,美国人说,大数据是资源,和大油田、大煤矿一样,可以源源不断挖出大财富。而且和一般资源不一样,它是可再生的,是越挖越多、越挖越值钱的,这是反自然规律的。对企业如此,对行业、对国家也是这样,对人同样如此。
三、新智慧生物的诞生?
自然语言的机器翻译,是长期以来人工智能研究的一个重要体现。人工智能从过去到未来都有清晰而巨大的商业前景,是以前IT业的热点,其热度一点不亚于现在的“互联网”和“大数据”。但是,人类过去在推进人工智能的研究遇到了巨大的障碍,最后几乎绝望。
当时人工智能就是模拟人的智能思考方式来构筑机器智能。以机器翻译来说,语言学家和语言专家必须不辞劳苦地编撰大型词典和与语法、句法、语义学有关的规 则,数十万词汇构成词库,语法规则高达数万条,考虑各种情景、各种语境,模拟人类翻译,计算机专家再构建复杂的程序。最后发现人类语言实在是太复杂了,穷 举式的做法根本达不到最基本的翻译质量。这条道路最后的结果是,1960年代后人工智能的技术研发停滞不前数年后,科学家痛苦地发现以“模拟人脑”、“重 建人脑”的方式来定义人工智能走入一条死胡同,这导致后来几乎所有的人工智能项目都进入了冷宫。
后来有人就想,机器为什么要向人学习逻辑呢,又难学又学不好,机器本身最强大的是计算能力和数据处理能力,为什么不扬长避短、另走一条道路呢?这条道路就 是IBM“深蓝”走过的道路。1997年5月11日,国际象棋大师卡斯帕罗夫在和IBM公司开发的计算机“深蓝”进行对弈时宣布失败,计算机“深蓝”因此 赢得了这场意义深远的“人机对抗”。
类似的逻辑在后续也用到了机器翻译上。谷歌、微软和IBM都走上了这条道路。就是主要采用匹配法,同时结合机器学习,依赖于海量的数据及其相关相关统计信息,不管语法和规则,将原文与互联网上的翻译数据对比,找到最相近、引用最频繁的翻译结果做为输出。
总而言之,利用这种技术,计算机教会自己从大数据中建立模式。有了足够大的信息量,你就能让机器学会做看上去有智能的事情,别管是导航、理解话语、翻译语言,还是识别人脸,或者模拟人类对话。
假设目前刚刚兴起的穿戴式计算设备取得巨大的进展。这种进展到什么程度呢?就是你家的宠物小狗身上也装上了各种传感器和穿戴式设备,比如有图像采集,有声 音采集,有嗅觉采集,有对小狗的健康进行监控的小型医疗设备,甚至还有电子药丸在小狗的胃中进行消化情况监控。小狗当然也联上网,也一样产生了巨大的数据 量。这时,我们假设基于这些大数据建模,能够模拟小狗的喜怒哀乐,然后还能够通过拟人化的处理进行语音表达,换句话说,就是模拟小狗说人话,比如主人回家 时,小狗摇尾巴,旺旺叫,那么这个附着于小狗身上的人工智能系统就会说,“主人,真高兴看到你回家”。不仅如此,你还可以和小狗的人工智能系统进行对话, 因为这个人工智能系统能基本理解你的意思,又能够代替小狗拟人化表达。
我们继续把这个故事来做延伸,把小狗换成未来的人,人在一生中产生大量的数据,根据这些数据建模可以直接推演出很多的结论,比如喜欢看什么样的电影啊,喜欢什么口味的菜啊,在遇到什么问题时会怎么采取什么行动啊。
这样的数据一直累积下来,直到这个人去世。我们有个大胆的想象,这些巨大的数据能否让这个人以某种方式继续存在下去呢?后代有什么问题需要寻求答案的时 候,比如在人生的关键抉择时,比如大学要上什么专业、该不该和某个姑娘结婚,可不可以问问这个虚拟的人(祖先)有什么建议呢?答案是当然可以。在这种情况 下,数字化生存不仅在人生前存在,也可以在人死后继续存在。人死了,可以在虚拟空间中继续存在。一辈子、一辈子的人故去,这些虚拟的智慧都可以继续存在, 假设很多年过去了,这些虚拟智慧的祖宗们太多太多了,活着的子孙们甚至可以组建一个“祖宗联席参谋委员会”,优选那些考得好的(比如中过状元),当过国家 高级公务员(比如太守)、当过企业高管(比如CEO)、当过教授、当过作家的等等当过成功人士的祖宗,专门用于后代的咨询、解惑。让这些祖宗死后还有竞 争,别死了就没有事情干了。
这些说明什么呢?就是随着大数据和机器学习的进一步进展,这个世界出现了新的智慧生物!大数据和机器学习在改变、重构和颠覆很多企业、行业和国家以后,终于到了改变人类自身的时候了!人类的演进出现了新的分支!
有科学家画了下面一张图,来描述这两者智慧生物。一种是基于生物性的,经过几百万年的进化而来;一种是基于IT技术,基于大数据和机 器学习,通过自模拟、自学习而来。前者更有逻辑性,更有丰富的情感,有创造力,但生命有限;后者没有很强的逻辑性,没有生物上的情感,但有很强的计算、建 模和搜索能力,理论上生命是无限的。
当然,这些事情要发生都会非常非常遥远。反正我们活着的时候是见不到了,死了也见不到,因为我们死的时候,我相信这种建立在大数据和机器学习之上的虚拟生命还不会存在。
四、结束语
我最后想说的是,我们对未来的认知,主要是基于常识和对未来的想象。根据统计,现在《纽约时报》一周的信息量比18世纪一个人一生所收到的资讯量更大,现 在18个月产生的信息比过去5000年的总和更多,现在我家一台5000元电脑的计算能力比我刚入大学时全校的计算能力更强大。科技的进步在很多的时候总 会超出我们的想象,试想如果未来我们一个人拥有的电脑设备超过现在全球现在计算能力的总和,一个人产生的数据量超过现在全球数据量的总和,甚至你的宠物小 狗产生的信息量都超过现在全球数据量的总和,世界会发生什么呢?那就取决于你的想象力了。

10 Things To Do After Installing Ubuntu 14.04 Trusty Tahr To Get A Near Perfect Desktop

Note: This is from http://www.webupd8.org/2014/04/10-things-to-do-after-installing-ubuntu.html
 
Ubuntu 14.04 LTS (Trusty Tahr) will be released tomorrow and since many of you will install it as soon as it's released (or maybe you're already using Ubuntu 14.04), here's a list of 10 useful things to do to get a near perfect desktop.

Ubuntu 14.04 things to do

While the tweaks below are targeted at Unity, many of them also work with other Ubuntu flavors like Xubuntu, Kubuntu, Lubuntu or Ubuntu GNOME.

Update: the instructions / things to do below also apply for the latest Ubuntu 14.10 (Utopic Unicorn), except for:
  • 1.2 (Pidgin Indicator is no longer required because Pidgin now ships with a Unity integration plugin; you can still use Pidgin Indicator if you want though);
  • 3.1 (Firefox now supports H224 without any tweaks);
  • 4.1 (you can continue to use Pipelight for various web services that require Silverlight, but that's no longer required for Netflix - to use Netflix with HTML5, simply install Google Chrome and it should work without any additional tweaks - that's now also the case for Ubuntu 14.04).



1. Install Ubuntu AppIndicators (applets)


Ubuntu ships with just a few indicators by default because well, it can't guess what everybody needs. So here are some indicators you might find useful.

1.1 Calendar Indicator is one of my favorite Ubuntu indicators. This AppIndicator displays your 10 upcoming events in the indicator menu, can add new events (which of course, are synced with Google Calendar) and it has a complete calendar view where you can see all your Google Calendar events, edit or add new events, etc.

Google Calendar Indicator

To install Calendar Indicator in Ubuntu 14.04, use the following commands:
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install calendar-indicator

1.2 Pidgin may not be the default IM client for a few Ubuntu releases, but it's still a very popular application. Pidgin uses a tray icon by default but you can now use an AppIndicator which is especially useful since the old Unity systray whitelist is no longer available.

Pindgin Indicator

Pidgin Indicator is not an part of Pidgin by default but it works great and you can install it in Ubuntu 14.04 by using the main WebUpd8 PPA:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pidgin-indicator
Once installed, open Pidgin and from its menu select Tools > Plugins, then scroll down until you see a plugin called "Ubuntu Indicator" and enable this plugin.


1.3 Since Ubuntu doesn't ship with a weather indicator, I recommend My Weather Indicator, an appindicator that displays the current weather on the Unity top panel. The tool can also display a 5-day forecast (it depends on which Weather service you use), it comes with some very nice (optional) desktop widgets and more.

My Weather Indicator

To install it in Ubuntu 14.04, use the following commands:
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install my-weather-indicator

1.4 Variety is more of a fully featured application than just a simple AppIndicator, but I'll add it here anyway since I'm sure many of you will love it.

Variety Wallpaper Changer

Variety is a wallpaper changer that automatically downloads and changes your wallpaper on a given interval. Using it, you'll get cool, fresh wallpapers each day. Or each hour. Or... well, it's up to you when the wallpaper changes. From the AppIndicator menu you can quickly switch to the next (random) wallpaper or copy the wallpaper to favorites, for later use.

To install Variety in Ubuntu, use the following commands:
sudo add-apt-repository ppa:peterlevi/ppa
sudo apt-get update
sudo apt-get install variety

1.5 Cpufreq Indicator is the equivalent of the old GNOME CPU frequency scaling applet which can be used for changing the CPU frequency on-the-fly. Install it in Ubuntu by clicking the button below:

Download for Ubuntu

Or install it from the command line:
sudo apt-get install indicator-cpufreq

Cpufreq indicator

Note that Cpufreq Indicator doesn't work with Intel P-State (see 8.2).

For more Ubuntu indicators, see our AppIndicator tag.


2. Tweak Unity


2.1 Some Unity settings are available in the Appearance settings, some in CCSM, some can only be accessed via Dconf and so on. With Unity Tweak Tool, you have access to almost all these settings in one place, using a very nice user interface.

Unity Tweak Tool

Unity Tweak Tool allows you to change various Unity settings, like auto-hide behavior, tweak the Dash, the Unity Launcher or HUD, change window snapping and hot corner settings, change the GTK and icon theme, access various font settings and more.

To install Unity Tweak Tool from the Ubuntu Software Center, click the button below:

Download for Ubuntu

Or, install it in Ubuntu 13.10 via command line:
sudo apt-get install unity-tweak-tool


2.2 Privacy

By default, Dash displays all the recently accessed files along with other files found on your system. But you can change this by selecting Security & Privacy from System Settings, and then tweak everything to suit your needs:

Ubuntu Privacy

On the Search tab, you can select to disable online search results from being displayed in Dash. However, you may want to use some scopes so instead of completely disabling this, you can open Dash and on the applications lens (the second lens) click "Filter results", then select "Dash plugins" - here, you can enable/disable any Dash plugin you want:

Ubuntu Dash Plugins

To disable a plugin, click it and then simply click "Disable":

Ubuntu Dash Plugins

If you want to disable the shopping suggestions, you can run the following command in a terminal:
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"


2.3 An option to enable minimize on click for the Unity Launcher was one of the most requested Ubuntu features and you can now enable this in Ubuntu 14.04.

Update: Unity Tweak Tool was updated with an option to enable minimize on click for the Unity Launcher.

To enable minimize on click for the Unity Launcher (Unity Tweak Tool doesn't support this yet), install CompizConfig Settings Manager. You can install it by clicking the button below:

Download for Ubuntu

Or, to install it via command line, use:
sudo apt-get install compizconfig-settings-manager

Then, open CompizConfig Settings Manager from Dash, click the "Ubuntu Unity Plugin" and on the Launcher tab, enable "Minimize single window applications (unsupported)":

CCSM

Note that this feature only works with single window applications.

2.4 Try the new locally integrated menus (LIM)

Ubuntu 14.04 ships with a new (non-default) type of menu called "LIM", or "locally integrated menu". Locally integrated menus are displayed in the window decorations for unmaximized windows, instead of the default Unity approach which is to display the menu on the top panel, and are displayed on mouse over.

Ubuntu locally integrated menus

Since the Unity global menu is not appreciated by everybody, maybe you'll find LIM better, so give it a try. To enable it, open System Settings > Appearance and on the Behavior tab, select to show the menus "in the window's title bar":

Ubuntu locally integrated menus


3. Fixes


3.1 Get Firefox to support H.264

The FFmpeg plugin for GStreamer 0.10 is not available in the official Ubuntu 14.04 repositories (because FFMpeg is not available either - libav is used instead) and because of this, Firefox doesn't support the H.264 codec.

Furthermore, without the FFmpeg plugin for GStreamer 0.10 package, KDE apps can't play H.264 videos in Kubuntu 14.04 if they use the GStreamer backend. Another issue with this is that Amarok can't play WMA files. There might also be other affected applications.

Before:

Firefox h.264

After:

Firefox h.264

To "fix" this, all you need is install the "gstreamer0.10-ffmpeg" package and its dependencies. If you've upgraded from an older Ubuntu version, this package might already be installed but if this is a fresh install, you can get the package from a PPA. Add the PPA and install it using the following commands:
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg

3.2 Fix Skype not using the correct system theme on 64bit

On 64bit Ubuntu systems, Skype uses the Clearlooks theme instead of the default Ubuntu theme, Ambiance (this also happens with other themes).

This occurs because Skype is a 32bit application and the GTK2 theme engine (Murrine or Pixmap in most cases) is not installed for 32bit.

Before:

Skype broken theme 64bit Ubuntu

After:

Skype fixed theme 64bit Ubuntu

To fix this, you need to install the 32bit Murrine and Pixmap GTK2 engines:
sudo apt-get install gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386

3.3 Fix missing Skype tray icon / appindicator on Ubuntu 64bit


On 64bit, the required package to get a Skype tray / appindicator icon is not installed automatically. To fix this, use the following command:
sudo apt-get install sni-qt:i386
The Skype tray icon might disappear after you log in, but it should show up after a few seconds.


4. Web browser (Firefox, Google Chrome / Chromium) tweaks


4.1 Firefox, Google Chrome/Chromium: if you want to use services such as Netflix, Maxdome and others, you can use Pipelight. Pipelight lets you use Microsoft Silverlight, Widevine (the built-in Chrome Widevine doesn't work with many websites), and more with native Linux web browsers (Pipelight itself uses Wine).

Netflix Ubuntu

Before installing Pipelight, it's strongly recommended to close your web browser. Without doing this, the plugin may fail to install or crash the browser (you can copy the instructions below to a text editor).

To install Pipelight in Ubuntu 14.04, you can use its official PPA. Add the PPA and install Pipelight using the commands below:
sudo apt-add-repository ppa:pipelight/stable
sudo apt-get update
sudo apt-get install pipelight-multi

Then, install the Silverlight plugin using the following command:
sudo pipelight-plugin --enable silverlight

To install the Widevine plugin, use the command below:
sudo pipelight-plugin --enable widevine


A lot more about Pipelight, here: Pipelight: Use Silverlight In Your Linux Browser To Watch Netflix, Maxdome Videos And More


4.2 Chromium will soon stop using the Netscape Plugin API, and as a result, the Linux Adobe Flash will stop working. To get Flash working in Chromium, you can use the Pepper Flash Player installer (Pepper Flash is extracted from Google Chrome), which is available in the official Ubuntu 14.04 repositories. To install it, use the following commands:
sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install

Chromium Pepper Flash Ubuntu

For more about this, see: Pepper Flash Player Installer For Chromium Available In The Ubuntu 14.04 Repositories

4.3 Firefox doesn't use native notifications under Linux. A work-around for this issue is to use GNotifier, a Firefox extension that makes the browser use native notifications on the Linux desktop. The extension currently supports GNOME (Shell), Unity, KDE and Xfce.

Firefox native notifications GNOME Shell

Firefox native notifications Unity

The extension is available HERE and doesn't require restarting the browser after it's installed.


5. LibreOffice tweaks


LibreOffice has 2 cool features (well, one of them isn't exactly a feature but anyway) that aren't enabled by default: a sidebar that enables quick access to document styles, formatting, etc. and a cool new monochrome icon set.

LibreOffice sifr

5.1 To enable the LibreOffice sidebar, simply select View > Sidebar from the LibreOffice menu.

5.2 To use the monochrome icon set, firstly install it by clicking the button below:

Download for Ubuntu

Or, install it via the command line using:
sudo apt-get install libreoffice-style-sifr

And then to activate it, from the LibreOffice menu select Tools > Options > LibreOffice > View and select "Sifr" under "Icon size and style":


6. Nautilus "tweaks"


The heading says "tweaks" in quotes because one of them is not exactly a tweak, but a replacement.


6.1 Use the search / type-ahead feature that suit your needs

In Ubuntu 14.04, Nautilus was patched to use type-ahead find instead of its default behavior for a few Nautilus releases, which is recursive search. However, there's a Dconf option you can use to switch between these two behaviors.

Type-ahead find allows to type the name of a directory or file in the file manager to select it without searching in the sub-folders while the recursive search is, like the name suggests, a search inside the current folder and all its sub-folders.

Nautilus recursive search
Recursive search

Nautilus type-ahead find
Type-ahead find

To switch to recursive search in Nautilus under Ubuntu 14.04, use the following command:
gsettings set org.gnome.nautilus.preferences enable-interactive-search false

If you want to switch back to type-ahead find ("interactive search"), use the command below:
gsettings set org.gnome.nautilus.preferences enable-interactive-search true

More info: Nautilus Type-Ahead Find Feature Enabled By Default In Ubuntu 14.04

6.2 If you don't like Nautilus 3.10, switch to Nemo

As you know, Ubuntu 14.04 uses Nautilus 3.10 as the default file manager. Nautilus is nice, but it lacks many features it once used to have, like the dual pane view (which was triggered using F3). You can get this back by using Nemo, which I patched to work properly under Unity and to get rid of the Cinnamon dependencies (the original patches were created by Jacob Zimmermann, I just updated them for a newer Nemo version and added some other patches for better desktop integration).

Nemo file manager

Since there are some quite a few things you should know before replacing Nautilus with Nemo in Ubuntu 14.04, I won't post the instructions here, but you can read all about it in an article I posted a while back: Install Nemo With Unity Patches (And Without Cinnamon Dependencies) In Ubuntu (it includes instructions for replacing Nautilus with Nemo, installing some Nemo extensions as well as how to revert the changes in case you want to go back to Nautilus as the default file manager).



7. Nvidia Optimus tweaks


Note for AMD hybrid graphics users: you can use fglrx-pxpress and AMD Indicator which are basically the equivalents of the tweaks below for AMD, but since my laptop uses Nvidia Optimus, it means I can't test this on AMD hybrid graphics so I won't post instructions here. See the Ubuntu wiki for more info.

7.1 Switch between Nvidia and Intel graphics

Installing nvidia-prime can get your system to boot in low graphics mode if it's not used properly so be careful. This should be considered an "expert" feature and should only be used by those who know how to fix their system in case something goes wrong!

It's also important to note that you need to use LightDM (so this won't work for Ubuntu GNOME users by default because it uses GDM - you'll need to switch to LightDM) and the proprietary Nvidia drivers!

In Ubuntu 14.04, you can switch between the Nvidia and Intel graphics from the Nvidia Settings. Firstly, install nvidia-prime:
sudo apt-get purge bumblebee*
sudo apt-get install nvidia-prime
(the first command makes sure all the Bumblebee packages were purged - without this, nvidia-prime won't work)

Then simply open Nvidia Settings, select "PRIME Profiles" on the left and select the graphics card you want to use:

Ubuntu Nvidia Settings Prime profiles

Note that switching between CPUs requires a logout so you can't for instance run the desktop using the Intel graphics while running a game using the Nvidia graphics under the same session. For that you can continue to use Bumblebee, but unfortunately you can't use both, so remove nvidia-prime if you want to use Bumblebee.

7.2 Prime Indicator (requires the nvidia-prime package, see 7.1)

Ubuntu Prime indicator

To quickly switch between the Intel and Nvidia graphics or see which graphics card is currently in use, you can use Prime Indicator. You can install it in Ubuntu 14.04 using the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install prime-indicator


8. Laptop tweaks


8.1 Improve battery life

There are various tweaks that you can apply to your laptop to save battery power, but many of them depend on the hardware, Linux distribution, some are outdated or too hard to apply for regular users and so on.

TLP is an advanced power management command line tool for Linux that tries to apply these settings / tweaks for you automatically, depending on your Linux distribution and hardware.

To install TLP in Ubuntu 14.04, use the commands below:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start
Important: make sure laptop-mode-tools is not installed (simply run "sudo apt-get remove laptop-mode-tools" and it will be removed if it's installed), as it conflicts with TLP.

For more information, see our article on TLP.


8.2 Thermald + Intel P-State

While some users have reported that their laptops actually get a bit hotter using this, but that they get better performance with Thermald + Intel P-State (see the comments), for my laptop, this has done wonders and I can say that my now quite old laptop was never cooler. That of course might not be the case for you (since it depends on your hardware), but you can give it a try and see for yourself.

Since the instructions are pretty long, I won't post them here. Instead, see our Thermald + Intel P-State article.


9. Install codecs, Java and encrypted DVD playback


9.1 To be able to play most audio and video formats, install Ubuntu Restricted Extras by clicking the button below:

Download for Ubuntu

Or install it using the following command:
sudo apt-get install ubuntu-restricted-extras

9.2 I suggest to also install the unrestricted version of libavcodec so you don't encounter issues with missing codecs when trying to use some video editors or transcoders - install them by clicking the button below:

Download for Ubuntu

Or by using the following command:
sudo apt-get install libavcodec-extra

9.3 You may also need Java, but you must figure out what you need. Most users will only need OpenJRE and the Java browser plugin which you can install by clicking the button below:

Download for Ubuntu

Or by using the following command:
sudo apt-get install icedtea-7-plugin openjdk-7-jre

For development, you'll also want OpenJDK which you can install by using the button below:

Download for Ubuntu

Or by using the following command:
sudo apt-get install openjdk-7-jdk

If for various reasons, you need Oracle Java (the package includes JDK, JRE and the browser plugin), you can install Oracle Java 7 by using the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

9.4 Encrypted DVD playback: the Medibuntu repository no longer exists and while most packages in the Medibuntu archive are obsolete or unnecessary because most are now in the official Ubuntu repositories or have better equivalents, livdvdcss is still required for playing encrypted DVDs. 

You can enable encrypted DVD playback in Ubuntu 14.04 by using the following commands:
sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh


10. Other tweaks / things to install


10.1 As you probably know by now, Ubuntu One will be shut down. If you were using this cloud storage service, there are many alternatives you can use, which work under Linux. Dropbox is probably the most popular, but you can also use Google Drive, which is getting better and better and it's cheap too if you want some extra space (you also get 15GB of free storage).

Ubuntu Google Drive

There's no official Google Drive client for Linux (yet), but you can use a tool like Insync (paid), or Google Drive Ocamlfuse, a tool that lets you mount Google Drive in Linux. To install Google Drive Ocamlfuse in Ubuntu 14.04, use the following commands:
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse

Once it's installed, you'll firstly need to authorize it with Google, by running the following command:
google-drive-ocamlfuse
This should open a tab in your default web browser, asking to allow google-drive-ocamlfuse to access your Google Drive. Click "Allow", wait a few seconds for google-drive-ocamlfuse to retrieve the authorization code and you're done.

Now let's mount Google Drive. Create a folder in your home directory, let's call it "gdrive":
mkdir ~/gdrive

And mount Goole Drive using the command below:
google-drive-ocamlfuse ~/gdrive

That's it.

More info: Mount Google Drive In Linux With google-drive-ocamlfuse

10.2 If you're constantly getting crash report popups, disable Apport

Apport is disabled by default in stable released according to THIS (thanks Silviu!) however, it's not disabled if you've installed an alpha, beta or daily build.

Reporting bugs is important for Ubuntu, but if you get a large number of crash reports and nothing is actually crashing, you can disable error reporting. To do this, you need to edit "/etc/default/apport" with a text editor such as Gedit (as root):
gksu gedit /etc/default/apport
and change "enabled" from "1" to "0", then save the file.

After completing the steps above, Apport won't be started at boot any more, but let's stop the running Apport process too, so you don't have to wait until you restart your computer:
sudo service apport stop

More info: How To Get Rid Of Internal System Error Apport Popups In Ubuntu


10.3 Unity global menu & HUD support for Java swing applications

Unity global menu java swing applications

Unity HUD java swing applications


By default, Java Swing applications (IntelliJ IDEA, Android Studio, jDownloader and others) don't support Unity global menu (AppMenu) / HUD. You can get these features though, by using JAyatana, which you can install in Ubuntu 14.04 by using the following commands:
sudo add-apt-repository ppa:danjaredg/jayatana
sudo apt-get update
sudo apt-get install jayatana
Once installed, log out and log back in.

More info: Get Unity Global Menu / HUD Support For Java Swing Applications With JAyatana

10.4 Adobe Flash Player (YouTube and a few other websites only, it seems) hardware acceleration with Intel graphics

libvdpau-va-gl is a VDPAU driver that uses OpenGL under the hood to accelerate drawing and scaling, and VA-API (if available) to accelerate video decoding.

Using it, you can get hardware acceleration on some Intel graphics cards for Mplayer (well, we already have mplayer-vaapi but it hasn't been merged) and even Adobe Flash Player. That means a lot less CPU usage.

For instance, in my test, a full-screen 1080p flash YouTube video used around 160-170% CPU without libvdpau-va-gl and about 14-17% CPU when using libvdpau-va-gl:

libvdpau-va-gl1

Since there are a few things you should know and the instructions include 2 use cases, I won't post the instructions here and instead, I'll add a link to our libvdpau-va-gl article: Adobe Flash Player Hardware Acceleration on Intel Graphics Cards

Skype doesn't show up on ubuntu upper panel

If you also find your skype doesn't show up on ubuntu upper panel, 
here is the way to get it back. 
 
 
$ sudo apt-get install sni-qt:i386