• 10:18上午

使用git reflog恢复由于reset丢掉的commit

上个星期的最后一个工作日,我的一个同事突然跟我说他丢掉了所有的前两天的工作,因为他使用了git reset命理到了一个之前的commit,而他本地新的工作并没有push到远程。在收到这个“噩耗”般的消息后,已经被多个事情需要在周末之前确定的我,一时心脏都快要停止跳动了(joking… ^_^) 。但是,我相信git的威力它一定有办法把这个东西恢复过来。确实,结果这个工作其实非常的容易: (more…)

  • 09:14下午

Just another successful Git Branching Model for flexible sprint cycle

This Git Branching Strategy is based on the famous “Git Flow“ process (http://nvie.com/posts/a-successful-git-branching-model/ ). However, according to our project’s sepcific needs, we adapted the basic branching principle and made some modification on the original model. In the end, this branching model is shown by the picture below:

Git Branching Model illustration
Git Branching Model illustration

(more…)

last comments
joseph
joseph

good thing that git has cheap branching.
James Ting
James Ting

What would be the meaning of the Main Branch?
David Adam

you mean the Master Branch?

  • 09:25下午

Use Drupal as a direct project prototype and project management tool

Currently I manage a Drupal project based on Drupal commerce. While I am writing the specs for the project, I really feel that actually we can use Drupal as a platform serve as prototype and project document management tool. (more…)

  • 03:45下午

密码保护:My short marriage with eZ Systems

这是一篇受密码保护的文章,您需要提供访问密码:

  • 04:06下午

Reinvent

Those who do not understand Unix are condemned to reinvent it, poorly – Henry Spencer

  • 03:13下午

HTML 5 the language that one should learn about

HTML 5 is known as a markup language which is used in organising the World Wide Web and also it is the hard-core technology for the Internet. The number five in the HTML denotes that it is the fifth version of it. Many improvements and features are added in this language. (more…)

  • 12:28下午

Use 127.0.0.1 instead of localhost on Zend Server

When install some system on Zend Server locally, such as Magento, sometimes, you need change the database server name from “localhost” to “127.0.0.1”.

It is just a note written as a record for future reference.

last comments
juliadiets.com
juliadiets.com

linux - Can t connect to MySQL using localhost but using 127.0.0.1 it s ok? - Server Fault

  • 05:30下午

Drupal 8 and eZ Publish 5 and Symfony

(more…)

last comments
Mahmoud Fawzy
Mahmoud Fawzy

Man, your post is clearly biased towards eZPublish :) ... not saying that is bad or completely wrong but it…
David Adam

You are right, it is biased towards eZ Publish because it is an originally a post for the market purpose…
Kapil Dave
Kapil Dave

Well, saying this and that is not available in Drupal's core system and hence it is not good enough is…
David Adam

I agree with you. But the article had some bias in the other system. Drupal is a great system.…

  • 04:33下午

Redis内核概念

在Redis里的每一个东西都是用字符串表示的。即使像列表,集合,有序集合和图都是字符串的组合。Redis定义了一个特殊的结构,它调用一个叫”简单动态字符串”(Simple dynamic string, SDS)。这个结构有3个部分组成,分别是:

  • buff — 一个存储字符串的字符型数组
  • len — 一个长整型记录buff数组的长度
  • free — 可用的额外的字节数

虽然你会觉得分开地存储数组长度会造成额外的开销,因为这应该可以很容易地根据buff数组来计算出它的长度,但是这样做允许字符串长度的检索在固定的时间内完成。

Redis将它的数据集保存在主内存中,在需要的时候才持久性地写到磁盘上。不像MongoDB,它不使用内存映射文件来达到那个目的。确实,Redis实现有它自己的虚拟内存子系统。当一个数值被交换到硬盘时,一个指向那个硬盘页面的指针和它的键值一起存储。关于虚拟内存的技术文档,可以在此地址阅读http://code.google.com/p/redis/wiki/VirtualMemorySpecification.

除了虚拟内存管理,Redis还包含一个事件库以帮助协调非死锁(non-locking)的socket操作。
为什么Redis不依靠操作系统的虚拟内存的交换机制呢?

Redis不依赖操作系统的内存交换,因为:

  • Redis对象不能一对一地映射到交换虚拟内存的页面。交换页面是4,096字节长而Redis对象可以跨越一个以上的交换页面。类似地,一个以上的Redis对象也可能在一个交换页面上。所以,即使是一小部分Redis对象被访问,有可能涉及到很多个交换页面。是操作系统来监控交换页面的访问。所以,即使是在交换页面中的一个字节被访问,这都会将要移交到(操作系统的)交换系统。
  • 不像MongoDB, Redis数据格式在RAM中和在硬盘上是不一样的。在硬盘上的数据比它在内存中时要压缩了很多倍。这样,使用自实现的交换涉及到更少的磁盘I/O。

Salvatore Sanfillipo, Redis的作者,在他的博客中有谈到Redis的虚拟内存系统,“Redis Virtual Memory: the story and the code,” at http://antirez.com/post/redis-virtual-memory-story.html.

  • 09:55上午

NoSql Notes

In NoSQL stores, the create and read operations are more important than the update and delete operations, so much so that sometimes those are the only operations.