我有以下结构:
<body>
<div id="main-wrapper">
<header>
</header>
<nav>
</nav>
<article>
</article>
<footer>
</footer>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
我<article>使用javascript 动态加载内容.因此,<article>块的高度可以改变.
我希望<footer>当有很多内容时,块位于页面的底部,或者当只有几行内容时,在浏览器窗口的底部.
目前我可以做其中一个......但不是两个.
所以有人知道我怎么做 - 让它<footer>坚持到页面/内容的底部或屏幕的底部,取决于哪个更低.
我在使用EC2,AWS,Docker,Consul-Template,Consul和NGINX进行一致的服务发现方面遇到了麻烦.
我有多个服务,每个服务都运行在自己的EC2实例上.在这些实例中,我运行以下容器(按此顺序):
自定义容器具有以下Dockerfile:
FROM nginx:1.9
#Install Curl
RUN apt-get update -qq && apt-get -y install curl
#Install Consul Template
RUN curl -L https://github.com/hashicorp/consul-template/releases/download/v0.10.0/consul-template_0.10.0_linux_amd64.tar.gz | tar -C /usr/local/bin --strip-components 1 -zxf -
#Setup Consul Template Files
RUN mkdir /etc/consul-templates
COPY ./app.conf.tmpl /etc/consul-templates/app.conf
# Remove all other conf files from nginx
RUN rm /etc/nginx/conf.d/*
#Default Variables
ENV CONSUL consul:8500
CMD /usr/sbin/nginx -c /etc/nginx/nginx.conf && consul-template -consul=$CONSUL -template "/etc/consul-templates/app.conf:/etc/nginx/conf.d/app.conf:/usr/sbin/nginx -s reload"
Run Code Online (Sandbox Code Playgroud)
app.conf文件如下所示:
{{range services}}
upstream {{.Name}} { …Run Code Online (Sandbox Code Playgroud) 我知道git shortlog -sne和git grep,但我需要将两者结合起来.
我正在搜索每个用户的提交消息中出现的字符串数.我希望输出为:
Will: 54
Dave: 34
... etc.
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙吗?