Here's a step-by-step to get started scripting Minecraft with Python on Mac OSX
This file contains hidden or 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 docker.io/golang:1.11.4 | |
# use go module by default | |
ENV GO111MODULE=on | |
# declare workdir, create if does not exist | |
WORKDIR /service/ | |
# Copy current dir in workdir | |
COPY . . |
This file contains hidden or 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
package endpoint | |
import ( | |
"encoding/json" | |
"net/http" | |
) | |
var ( | |
// GITCOMMIT will be overwritten automatically by the build system | |
GITCOMMIT = "HEAD" |
This file contains hidden or 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
mkdir /home/git/data/repositories/microservices/versionning.git/custom_hooks | |
cd /home/git/data/repositories/microservices/versionning.git/custom_hooks | |
curl -o pre-receive https://gist.githubusercontent.com/jtbonhomme/b88cfc3eda108fae75059ae83129d9cb/raw/1d80ffce50024df5453e0f822dfb402dd79229c5/pre-receive | |
chown git:git pre-receive | |
chmod 755 pre-receive |
This file contains hidden or 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/bash | |
# | |
# pre-receive hook for Commit Check | |
# | |
COMPANY_EMAIL="mycorp.org" | |
readonly PROGNAME=$(basename $0) | |
readonly PROGDIR=$(readlink -m $(dirname $0)) |
This file contains hidden or 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
{ | |
"branch": "master", | |
verifyConditions: [ | |
{ | |
path: "@semantic-release/gitlab", | |
gitlabUrl: "https://gitlab.domain.fr" | |
} | |
], | |
prepare: [ | |
], |
This file contains hidden or 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
.release-script: &release-script | |
- # this part allow the script to push tags on gitlab repos | |
- git remote set-url origin "https://${REGISTRY_USER}:${REGISTRY_TOKEN}@${GITLAB_URL}/${CI_PROJECT_PATH}.git" | |
- git config --global user.email '${REGISTRY_USER}@${DOMAIN}' | |
- git config --global user.name '${REGISTRY_USER}' | |
- # this part uses commit messages and semantic versioning to define a version number | |
- DEBUG=* semantic-release | |
- git push --tags || true | |
release: |
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'
Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
This file contains hidden or 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/bash | |
# | |
# pre-receive hook for Commit Check | |
# | |
COMPANY_EMAIL="mycorp.org" | |
readonly PROGNAME=$(basename $0) | |
readonly PROGDIR=$(readlink -m $(dirname $0)) |
Please go to Enable Docker Remote API with TLS client verification.