修改默认编辑器命令:
echo export EDITOR=/usr/bin/vim
修改默认编辑器命令:
echo export EDITOR=/usr/bin/vim
使用的插件如下:https://github.com/nirvdrum/svn2git
检查项目SVN中有没有使用 trunk, branches, tags ,如果都没有所以在fetch时指定 "--notrunk --notags --nobranches " 即可。
下面命令是转换 weixin_test的使用命令:
svn2git svn://[email protected]/lanrion/website/weixin_test --username denght --notrunk --no-minimize-url --notags --nobranches --verbose
一直挺纠结这个问题的。 | |
首先,== equality 等同,=== identity 恒等。 | |
==, 两边值类型不同的时候,要先进行类型转换,再比较。 | |
===,不做类型转换,类型不同的一定不等。 | |
循环时间:
Range.new(Time.now.to_i, 5.days.from_now.to_i).step(1.day) do |seconds_since_epoch|
time = Time.at(seconds_since_epoch)
puts time
end
module UnderscoreAttributeNameConcern
extend ActiveSupport::Concern
included do |included_class|
included_class.column_names.each do |attr_name|
method_name = attr_name.underscore
define_method(method_name) do
read_attribute(attr_name)
end
nginx 允许自定义header头通过: | |
ignore_invalid_headers off; | |
underscores_in_headers off; |
http://devdocs.io/rails/activerecord/aggregations/classmethods#method-i-composed_of | |
http://www.cnblogs.com/orez88/articles/1707653.html |
在 Mac上 使用 mssql server的gem:
brew update # always a good idea to update homebrew before installing anything!
brew install freetds
gem install tiny_tds -- --with-freetds-dir=/usr/local/freetds
Ubuntu上可能(未试验)是:
git fetch --prune --tags