Posts Mentioning RSS Toggle Comment Threads | Keyboard Shortcuts

  • tin 8:21 am on July 21, 2010 Permalink | Log in to leave a Comment
    Tags: leopard, ,   

    Leopard下如何让你的sudo不需要输密码 

    在Snow Leopard的Terminal里面用sudo的时候总是需要输入密码,而在单位的FreeBSD服务器上则不需要。我觉得从安全角度来说这个密码用处不大,有了反而会浪费时间。

    搜索了一下,发现要这样做

    修改/etc/sudoers文件(记得sudo vi它,存的时候要w!),去掉这一行前面的#号:

    %wheel ALL=(ALL) NOPASSWD: ALL

    然后执行下面命令,记得将your_username替换为你的用户名:

    sudo dscl . append /Groups/wheel GroupMembership your_username

    从此就不需要在sudo的时候输入密码了。

     
  • tin 5:53 am on July 14, 2010 Permalink | Log in to leave a Comment
    Tags: cassandra, consistency   

    Cassandra的一致性级别 

    翻译Cassandra文档中的一段。

    写一致性级别Write

    ZERO:
    不保证一致。写操作在后台异步执行。除非CASSANDRA-685 修正,否则当太多写错作排队的时候,buffer会膨胀,后果很坏。
    ANY:
    (需要0.6的Cassandra)保证至少写入到1个节点中,包括示意(hinted)的接收者。
    ONE:
    保证写操作在回复客户端前至少已经进入1个节点的commit log和memory table。
    QUORUM:
    保证写操作在回复客户端前至少被写入到 (<复制因数> / 2 + 1)个节点中。
    ALL:
    保证写操作在回复客户端前已经被写入到 <复制因数> 个节点中。任何节点如果没有响应,则操作失败。

    读一致性级别别Read:

    ZERO:
    不支持,因为没有意义。
    ANY:
    不支持,应该使用ONE来代替。
    ONE:
    将会返回第一个有响应结果的节点返回的数据。在使用ConsistencyLevel.ONE的时候,一致性检查永远是在后台线程中来修复一致性问题。这意味着如果开始的读取得到了旧数据时后续的调用可以返回正确的数据(这叫做读取修复 read repair)
    QUORUM:
    查询所有的节点,一但绝大多数复制节点返回了结果,返回具有最新的时间戳的纪录。其余复制节点的结果会在后台进行检查。
    ALL:
    查询所有的节点,一但所有复制节点返回了结果,返回具有最新的时间戳的纪录。任何节点如果没有响应,则操作失败。
     
    • 英文seo 12:33 pm on July 17, 2010 Permalink

      好东西,谢谢博主分享

    • xs8 3:13 pm on July 20, 2010 Permalink

      嗯. 多谢分享. 这个很有用

  • tin 5:29 am on July 13, 2010 Permalink | Log in to leave a Comment
    Tags:   

    The Perfect Is the Enemy of the Good 

    The perfect is the enemy of the good. The best is the enemy of the good. – Voltaire

    Nothing is perfect and waiting for the perfect moment or killing yourself trying to ensure that every thing your hand touches is done perfectly is a sure way to not get anything done at all.

    Getting caught up in the idea that your desk, work bench, house, or office must be in perfect shape for you to really get stuff done can just as easily result in getting nothing done. Learn to recognize what’s good enough.

    Perfectionism kills me.

     
    • cgupiao 2:48 am on July 14, 2010 Permalink

      博主,你的空间是哪里的呀,速度很快呀

    • tin 5:54 am on July 14, 2010 Permalink

      linode的,dallas机房。速度一般,听说Fremont会更快一点。

  • tin 5:35 am on July 7, 2010 Permalink | Log in to leave a Comment
    Tags: front-end agile   

    回复一位敬佩的前端工程师kejun的一篇博文,更好的标注UI规格

    我能理解作为前端工程师为什么希望这样标注,但是这些标注的实用价值很低,原因如下:

    1. 这些标注都是“文档”,或者说“契约”。过度详细的契约对产品的实现没有帮助。敏捷宣言里面说可用的软件重于完备的文档。
    2. 之所以会产生这些文档,沟通是问题。如果前端和Graphical designer不在一个团队,就会希望通过契约解决沟通问题,这样只能让沟通更低效。而且在这篇文章中所说的标注的方式的区别,是因为Graphical designer和前端工程师的“语言“不通,解决方法就是更加紧密的坐在一起工作,但是指望两个人用同样的思想沟通是不现实的。
    3. 精确到像素的设计(Hifi prototype)真的应该精确到像素么?敏捷软件开发是迭代的。产品应该可以持续的release,每个release前都有验收和验证,对于像素级别的精确如果在验收的时候能够发现,说明这个精确到像素的设计是有意义的,那么我们才需要花更多的时间去优化它。否则它也许是可以忍受的。所以,预先设计的过程中的精确到像素的约定不如退而求神似,这样对迭代也更加有利。
     
  • tin 4:07 am on July 4, 2010 Permalink | Log in to leave a Comment
    Tags: songs love   

    “Three Times a Lady” is a 1978 single from the funk/soul band the Commodores, from their 1978 album Natural High. It was produced by James Anthony Carmichael and the Commodores and it was the most popular track of the album.

    In an appearance on The Early Show on June 12, 2009, Richie said he was inspired to write it by a comment his father made about his mother. Reportedly his father said to his mother “I love you. I want you. I need you. Forever” hence the three times. It became the Commodores’s first Billboard Hot 100 number-one hit, topping the chart for two weeks on August 12, 1978. [2]. It was also the only Motown song to reach the Top 10 that year. The song also spent three weeks at #1 on the adult contemporary chart. It was one of only a few Motown singles to reach the top spot in the UK. In the years since the Commodores had started in 1974 it has been one of their most emotional songs since “You Don’t Know That I Know” from the album Caught in the Act in 1975.

    The original Commodores’ version of the song was included as the final track on Lionel Richie’s greatest hits compilation album Back To Front, released in 1992.

    http://en.wikipedia.org/wiki/Three_Times_a_Lady
     
  • tin 10:12 am on July 3, 2010 Permalink | Log in to leave a Comment  

    Macbook pro的DVD刻录失败,清除灰尘后修复 

    这两天要用我的MBP(Mid 2009 MC118)刻录一张DVD却总是失败,告诉我使用的DVD盘片不兼容,或者刻录速度太快(我试验了1, 2, 4, 8都不行),让我尝试其它品牌的盘片。但是之前我用的威宝的日产DVD-R一直没有这个问题,所以查看了一下system.log,发现报错的内容是这样的:

    Disk Utility[378]: Disk Utility: Burn to DVD-R (TYG02) media in MATSHITA DVD-R   UJ-868 (KB19) via ATAPI failed with error 0x8002006D and sense (3/73/03 Medium Error, Power calibration area error).

    Google到了很多信息,讨论的很复杂,大意就是光驱坏掉了,或者锁了区码。看到了这篇比较有用Can’t burn DVD’s with a MacBook Pro?,说先试试清理尘土。

    然后就打开了MBP后盖在光驱的几个角和缝的地方用皮老虎吹了一下(如果你的嘴很有力且不乱喷吐沫星子,那么也可以用嘴吹,但是这样很危险……),尘土还是挺多的。而后开机刻录就好了。

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel