This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ tmp cat Dockerfile | |
ARG FOO | |
FROM ubuntu | |
ENV BAR=$FOO | |
RUN echo "foo=$FOO" | |
RUN echo "foo=${FOO}" | |
RUN echo "bar=$BAR" | |
RUN echo "bar=${BAR}" | |
➜ tmp docker build --build-arg FOO=bar . | |
Sending build context to Docker daemon 38.05MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 8; | |
# daemon off; | |
# master_process off; | |
error_log /dev/stdout info; | |
events { | |
worker_connections 1024; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def match_all_params(payload, challenge) | |
challenge.each do |key, value| | |
return false unless payload.key?(key) | |
return false unless payload[key] =~ /#{value}/ | |
end | |
true | |
end | |
# returns true | |
puts match_all_params ({'foo'=>'bar', 'biz'=>'baz'}), ({'foo'=>'b.*'}) |
OlderNewer