我想在我的git日志上做一些统计数据来得到类似的东西:
10 Daniel Schmidt
5 Peter
1 Klaus
Run Code Online (Sandbox Code Playgroud)
第一列是提交计数,第二列是提交者.我已经达到了这个目的:
git log --raw |
grep "^Author: " |
sort |
uniq -c |
sort -nr |
less -FXRS
Run Code Online (Sandbox Code Playgroud)
有趣的部分是
grep "^Author: "
Run Code Online (Sandbox Code Playgroud)
我想修改一个漂亮的正则表达式来排除邮件地址.使用Rubular这样的东西http://rubular.com/r/mEzP2hFjGb工作,但如果我将它插入grep(或管道其他的)它将不会得到我正确的输出.
Sidequestion:是否有可能获得计数,而作者在保持这种管道命令样式的同时将其他东西与空白分开?我希望稍后在我们两个列之间有一个更好的分隔符(也许是一些颜色^^)
非常感谢你的帮助!
我想测量我的应用程序,它对性能非常敏感.
为此,我想知道Chrome开发工具中是否有选项或其他内容可以获得"网络选项卡"中提供的视图,但是我自己的JS触发事件(如红色/蓝色)线).
有办法吗?
我想使用mailcatcher来检查我的邮件是否已发送.他们不是,我想知道为什么,因为邮件生成并且肯定被称为.
所以在我的config/enviroment/development.rb中我写道:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
Run Code Online (Sandbox Code Playgroud)
我的电话看起来像这样:
OrderMailer.send_new_order(@order).deliver
Run Code Online (Sandbox Code Playgroud)
最后生成的控制器如下:
class OrderMailer < ActionMailer::Base
default from: "from@example.com"
def send_new_order(order)
@greeting = "Hi"
mail to: "to@example.org", subject: "Test"
end
end
Run Code Online (Sandbox Code Playgroud)
邮件当然是邮件运行的.那邮件为什么不发送?
actionmailer ×1
bash ×1
docker ×1
git ×1
git-log ×1
javascript ×1
kubernetes ×1
performance ×1
regex ×1