Install the OpenSSL on Debian based systems
sudo apt-get install openssl| function decode-authorization-failure-message { | |
| if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then | |
| cat <<'EOT' | |
| Usage: decode-authorization-failure-message <message> | |
| Use this when Amazon gives you an "Encoded authorization failure message" and | |
| you need to turn it into something readable. | |
| EOT | |
| return 1 | |
| fi |
| resource "aws_db_instance" "core" { | |
| username = "postgres" | |
| password = "changeme" | |
| ... | |
| } | |
| resource "null_resource" "master_password" { | |
| triggers { | |
| db_host = "${aws_db_instance.address}" | |
| } |
| import jenkins.* | |
| import hudson.* | |
| import com.cloudbees.plugins.credentials.* | |
| import com.cloudbees.plugins.credentials.common.* | |
| import com.cloudbees.plugins.credentials.domains.* | |
| import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
| import hudson.plugins.sshslaves.*; | |
| import hudson.model.* | |
| import jenkins.model.* | |
| import hudson.security.* |
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'The only information that aren't fetched are:
%B: raw body (unwrapped subject and body)%GG: raw verification message from GPG for a signed commit| #!/bin/bash | |
| # Retrieve AWS instrance's commonly used metadata. Require curl. | |
| # ./get-metadata help | |
| # ./get-metadata id | |
| # Input is case insensitive; format to uppper case to generate self-help page. | |
| info=${1^^} | |
| meta_data_url=http://169.254.169.254/latest/meta-data/ | |
| roleProfile=$(curl -s http://169.254.169.254/latest/meta-data/iam/info \ | |
| | grep -Eo 'instance-profile/([a-zA-Z.-]+)' | sed 's#instance-profile/##') |
| #!/bin/sh | |
| # | |
| # consul - this script manages the consul agent | |
| # | |
| # chkconfig: 345 95 05 | |
| # processname: consul | |
| ### BEGIN INIT INFO | |
| # Provides: consul | |
| # Required-Start: $local_fs $network |
| FROM alpine:3.7 | |
| RUN apk --no-cache add bash jq netcat-openbsd bc | |
| COPY docker-stats.sh /usr/local/bin/docker-stats.sh | |
| ENTRYPOINT ["docker-stats.sh"] |
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
This is a short article on how we integrate stash and slack in openmind
First of all i assume you have: