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
$ cat Dockerfile | |
FROM scratch | |
COPY build/foobar /usr/bin/foobar | |
COPY build/foobar.json /etc/foobar.json | |
ENTRYPOINT /usr/bin/foobar | |
$ docker build -f Dockerfile | |
... | |
$ cat Dockerfile.yaml | |
from: scratch |
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
#!/bin/sh | |
# | |
# Build a chroot with a CentOS 6.5 base install. | |
# | |
CHROOT=/tmp/chroot | |
mkdir -p $CHROOT | |
mkdir -p $CHROOT/var/lib/rpm |
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
build_type = os.environ['BuildType'] | |
tgt = { | |
'linux': 'ip-*', | |
'windows': 'WIN-*', | |
}[build_type] |
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 := $(shell touch a.txt) | |
srcs := $(wildcard *.txt) | |
all: $(srcs) | |
@echo $(srcs) |
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 := $(shell touch a.txt) | |
srcs := $(shell echo *.txt) | |
all: $(srcs) | |
@echo $(srcs) | |
clean: | |
rm -rf *.txt | |
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 := $(shell touch a.txt) | |
srcs := $(wildcard *.txt) | |
all: $(srcs) | |
@echo $(srcs) | |
clean: | |
rm -rf *.txt | |
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
@funcy.collecting | |
def unpack(*args): | |
d = args[-1] | |
for k in args[:-1] | |
yield d[k] | |
a, b = unpack('a', 'b', {'a': 1, 'b': 2, 'c': 3}) |
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
template <typename T, T def> | |
struct primitive_t : is_lexical_value<T> { | |
typedef T value_type; | |
primitive_t() : t(def) {} | |
primitive_t(T t) : t(t) {} | |
primitive_t& operator=(T a_t) { | |
t = a_t; | |
return *this; |