景灵

——我要我想要的


  • 首页

  • 分类

  • 归档

  • 标签

  • 关于

API设计

发表于 Mar 14 2015   |   分类于 设计
  1. HTTP API 设计指南(中文版)

    • http://www.css88.com/archives/5121
  2. 分页设计

    • https://devcenter.heroku.com/articles/platform-api-reference#ranges

mongoose资料

发表于 Mar 14 2015   |   分类于 Node.js
  1. 中文
    • http://ourjs.com/detail/53ad24edb984bb4659000013

git撤销操作(转)

发表于 Oct 1 2014   |   分类于 git , 转载 , 整理

来源: https://github.com/geeeeeeeeek/git-recipes/wiki/5.2-%E4%BB%A3%E7%A0%81%E5%9B%9E%E6%BB%9A%EF%BC%9AReset%E3%80%81Checkout%E3%80%81Revert%E7%9A%84%E9%80%89%E6%8B%A9

  原文对 git checkout, git reset, git revert 进行了非常清晰的介绍.









































命令作用域常用情景
git reset提交层面在私有分支上舍弃一些没有提交的更改
git reset文件层面将文件从缓存区中移除
git checkout提交层面切换分支或查看旧版本
git checkout文件层面舍弃工作目录中的更改
git revert提交层面在公共分支上回滚更改
git revert文件层面(然而并没有)

git fetch和git pull的区别

发表于 Sep 30 2014   |   分类于 git , 工具 , 问题

来源:http://www.yiibai.com/git/git_remote_operate.html

在Git中从远程的分支获取最新的版本到本地有这样2个命令:

  • git fetch:相当于是从远程获取最新版本到本地,不会自动merge
    git fetch origin master     # 远程的origin的master主分支下载最新的版本到origin/master分支上
    git merge origin/master     # 合并
  • git pull:相当于是从远程获取最新版本并merge到本地
    git pull origin master      # 相当于git fetch 和 git merge

在实际使用中,git fetch更安全一些,因为在merge前,我们可以查看更新情况,然后再决定是否合并。

git push.default设置

发表于 Sep 30 2014   |   分类于 git , 工具 , 问题

  在默认配置下,当使用git push命令而没有明确的指名本地分支和远程参考分支的情况下,会有如下提示:

1
2
3
4
5
6
7
8
9
10
11
12
warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'.
To squelch this message and maintain the current behavior after the default changes, use:
  git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
  git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11.
Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git)

阅读全文 »

git push时候总提示输入账号密码,如何避免?

发表于 Sep 29 2014   |   分类于 git , 工具 , 问题

问题:git push 的时候总提示输入账号密码,如何避免?

在~/下, touch创建文件.git-credentials, 用vim编辑此文件,输入内容格式:

1
2
3
$ touch .git-credentials
$ vim .git-credentials
https://{username}:{password}@github.com

1、 在终端下执行

1
$ git config --global credential.helper store

2、 可以看到~/.gitconfig文件,会多了一项:

1
2
[credential]
helper = store

这样就可以免密码 push 了

git flow学习资料

发表于 Sep 28 2014   |   分类于 git , 工具 , git flow

参考:https://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html

1、 git flow 原理:图灵社区 : 阅读 : 基于git的源代码管理模型——git flow(这篇文章讲的很详细)

2、 git flow 安装:

  • OSX
    • Homebrew: $ brew install git-flow
    • Macports: $ port install git-flow
  • Linux
    $ apt-get install git-flow
  • Windows (Cygwin)
    $ wget -q -O - –no-check-certificate https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash

    Windows安装 git-flow, 需要 wget 和 util-linux。
    阅读全文 »

git学习资料(整理)

发表于 Sep 28 2014   |   分类于 git , 工具 , 整理

git常用命令

    git init                                                        # 初始化本地当前目录为 git 仓库
git add . # 添加当前目录下的所有文件到本地仓库; git add pathOfFile 将某个文件添加到仓库
git commit -m “commit message” # 提交本地仓库的代码
git remote add origin https://github.com/crazyjingling/blog.git # 配置远程仓库,配置好后远程仓库在本地的名字是origin,也可以改成别的。
git push -u origin master # 将当前分支推送到远程master分支上,详情参见 git push
git branch -d add-crazyjingling #删除本地分支
git push origin –delete add-crazyjingling #删除远程分支

学习资料:

1、git命令行操作(很全面):

阅读全文 »

Javascript引擎(整理)

发表于 Aug 9 2014   |   分类于 Node.js , JavaScript , 整理

来源: https://zh.wikipedia.org/wiki/JavaScript%E5%BC%95%E6%93%8E

主要的网页浏览器JavaScript引擎:

开发中

  • Rhino,由Mozilla基金会管理,开放源代码,完全以Java编写。
  • SpiderMonkey,第一款JavaScript引擎,早期用于Netscape Navigator,现时用于Mozilla Firefox。
  • V8,开放源代码,由Google丹麦开发,是Google Chrome的一部分。
  • JavaScriptCore,开放源代码,用于Safari。
  • Chakra (JScript引擎),用于Internet Explorer[11]。
  • Chakra (JavaScript引擎),用于Microsoft Edge。
  • KJS,KDE的ECMAScript/JavaScript引擎,最初由哈里·波顿开发,用于KDE项目的Konqueror网页浏览器中。

停止开发

  • Linear A,用于Opera 4.0至6.1版本。
    阅读全文 »

为什么要用Node.js(转)

发表于 Aug 9 2014   |   分类于 Node.js , 文章 , 转载

来源: http://developer.51cto.com/art/201312/425921.htm

  正如维基百科所说:“Node.js 是谷歌 V8 引擎、libuv平台抽象层 以及主体使用 Javscript 编写的核心库三者集合的一个包装外壳。” 除此之外,值得注意的是,Node.js 的作者瑞恩·达尔 (Ryan Dahl) 的目标是创建具有实时推送能力的网站。在 Node.js 中,他给了开发者一个使用事件驱动来实现异步开发的优秀解决方案。

AD:介绍

  JavaScript 高涨的人气带来了很多变化,以至于如今使用其进行网络开发的形式也变得截然不同了。就如同在浏览器中一样,现在我们也可以在服务器上运行 JavaScript ,从前端跨越到后端,这样巨大的反差让人难以想象,因为仅仅在几年前Javascript 还如同 Flash 或者 Java applet 那样嵌入网页在沙箱环境中运行。

阅读全文 »
1…678
crazyjingling

crazyjingling

crazyjingling's blog | Node.js | javascript

75 日志
60 分类
106 标签
github twitter weibo zhihu
© 2016 crazyjingling
由 Hexo 强力驱动
主题 - NexT.Mist