Total Pageviews

Wednesday, 2 July 2014

linux的一些教程

Apache

Linux 内核

Linux 基础系统

Linux 基础服务

Gentoo Linux

RedHat Linux

磁盘与文件系统

from  http://lamp.linux.gov.cn/jinbuguo_florilegium.html

msdn开发者代码示例

http://code.msdn.microsoft.com/

一些跟js/jquery相关的东西

codereview.appspot.com网站的源码


This project shows how to create a somewhat substantial web application using Django on Google App Engine.
In addition, I hope it will serve as a practical tool for the Python developer community, and hopefully for other open source communities. As I've learned over the last two years at Google, where I developed a similar tool named Mondrian, proper code review habits can really improve the quality of a code base, and good tools for code review will improve developers' life.
Some code in this project was derived from Mondrian, but this is not the full Mondrian tool.
Source code has been published! See the Source tab above.
https://code.google.com/p/rietveld/

https://codereview.appspot.com/

代码托管服务

版本管理

代码片段

有关git的资料

Git Flow

Manual

Video

Slide

Tools

托管服务

  • github
  • Gitorious
  • repo.or.cz
  • Gerrit (代码评审工具 Gerrit,
    Gerrit 是一个基于Web的免费、开放源代码的代码审查软件。利用网页浏览器,同一个团队的软件程序员,可以相互审阅彼此修改后的程序代码,决定是否能够提交,退回或者继续修改。使用 Git 作为底层版本控制系统。
    下载: http://gerrit-releases.storage.googleapis.com/index.html ,https://bugs.chromium.org/p/gerrit/issues/list )
  • GitCafe - 国内 Git 托管服务。

Books

社区

Notes

如果希望提交到第三方代码托管服务器上,需要配置 ssh key, 系统通过这个 key 来验证用户身份。参考:Set Up Git
注意 :Windows 下需要先设置 HOME 环境变量,指向 C:\Documents and Settings\{username} 即可。
ssh-keygen -t rsa -C "email@addr.ess"
下面的三个等待输入可以直接回车确认。
完成后会在 HOME 目录下生成三个文件。
.ssh
 +- id_rsa
 +- id_rsa.pub
 `- known_hosts
把其中的 id_rsa.pub 的内容加到服务器的 SSH Public Keys 即可。
初始化用户信息:
git config --global user.name "{username}"
git config --global user.email "email@addr.ess"
Mac 将配置信息写在 ~/.gitconfig 文件中。 但是 user.name 的配置好像不会在 Git 日志中记录,git log 看到的会是 Autoor: {OS.username} <{OS.usernameWithOutSpeChar}@{MacOS.name}.local>
版本比较
git diff
git diff filename
git diff -cached
git diff -cached filename
git diff hashcode
git diff hashcode1 hashcode2
git diff hashcode1:filename hashcode2:filename
删除本地分支
git branch -D master

使用 Vim 作为 Git 默认编辑器(for Windows)

可以在 git commit 的时候弹出编辑器窗口。
创建 gvimf.cmd 并加入一下代码:
start "dummy" /b /wait "D:\Vim\vim73\gvim.exe" %*
然后执行一下代码:
git config --global core.editor gvimf.cmd
或将以下代码加入到 .gitconfig 文件中:
[core]
 editor = gvimf.cmd
参考 using gvim as editor on Windows

(文本)图形化查看 log

  • 执行以下命令:
    > git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
    
  • 或添加以下代码到 .gitconfig:
    [alias]
        lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
    
    然后执行命令:
    > git lg
    
    参考 pimping out git log

Mercurial 使用教程