Design pattern for how gists are labelled.
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
# Get a version from a json: | |
REMOTE_VERSION=$(curl -s URL_THAT_RETURNS_JSON|python -c 'import json,sys;obj=json.load(sys.stdin);print obj["version"]') | |
# Get latest version from Artifactory: | |
REMOTE_VERSION=$(curl -s http://{{artifactory_integration_host}}:8081/artifactory/api/npm/libs-npm-virtual/ww-node-configs/latest|python -c 'import json,sys;obj=json.load(sys.stdin);version = "0.0.0" if obj.get("version") is None else obj["version"];print version') | |
# To stop a job in jenkins if this build is not for a newer version: | |
python -c 'import sys; exit(0) if sys.argv[1] > sys.argv[2] else exit(1)' $LOCAL_VERSION $REMOTE_VERSION |
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
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { | |
log_not_found off; | |
proxy_cache_valid any 1m; | |
proxy_pass http://local_backend$uri$is_args$args; | |
add_header X-Proxy-Cache $upstream_cache_status; | |
} |
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
FROM golang | |
WORKDIR /go | |
RUN go get github.com/BurntSushi/toml && \ | |
go get github.com/kelseyhightower/confd && \ | |
cd $GOPATH/src/github.com/kelseyhightower/confd && \ | |
git remote add sort https://github.com/HeavyHorst/confd.git && \ | |
git pull sort sort && git checkout sort && \ | |
find / -type f -name "*confd" -exec rm {} \; && \ |
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
--- | |
confd: | |
build: . | |
links: | |
- etcd | |
volumes: | |
- ${PWD}/example.tmpl:/etc/confd/templates/example.tmpl | |
environment: |
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
10:44:13 sh: 1: modprobe: not found | |
10:44:13 Warning: current kernel is not supported by the linux-image-extra-virtual | |
10:44:13 package. We have no AUFS support. Consider installing the packages | |
10:44:13 linux-image-virtual kernel and linux-image-extra-virtual for AUFS support. | |
10:44:13 + sleep 10 | |
10:44:23 + sudo -E sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
10:44:28 Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.Hr5DxDRlw3 --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debia |
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
#!/usr/bin/env bash | |
#set -x # for debugging | |
function print_help(){ | |
read -r -d '' HELP_MSG << EOM | |
# | |
# See semver.org for details | |
# Commands look like | |
# |
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
Docs: | |
- https://github.com/Netflix-Skunkworks/zerotodocker/wiki/Security-Monkey | |
- http://securitymonkey.readthedocs.io/en/latest/quickstart.html#setup-iam-roles | |
- https://hub.docker.com/r/netflixoss/security_monkey-nginx/ | |
tl;dr | |
```bash | |
docker-compose up -d postgres | |
docker-compose up -d init # initializes database | |
docker-compose up -d nginx # will start api and nginx |
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
--- | |
Resources: | |
- https://google.github.io/styleguide/shell.xml | |
- http://tldp.org/guides.html |
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
#!/usr/bin/env groovy | |
# this is technically Jenkins Job Dsl | |
version = 1 | |
job('example') { | |
publishers { | |
configure { node -> | |
node / 'publishers' << 'hudson.plugins.doclinks.DocLinksPublisher' {} | |
node / 'publishers' / 'hudson.plugins.doclinks.DocLinksPublisher' << 'documents' {} | |
node / 'publishers' / 'hudson.plugins.doclinks.DocLinksPublisher' / 'documents' << 'hudson.plugins.doclinks.Document' { |
OlderNewer