Extracted from https://github.com/appuio/openshift-scripts/blob/master/openshift-backup.sh#L53-L64
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
| aws logs get-query-results --output text --query 'results[]|[?field==`@message`][value]' --query-id $(aws logs start-query --log-group-name "XXXX" --start-time `date -d '12 hour ago' "+%s"` --end-time `date "+%s"` --output text --query-string 'fields @message |filter (@logStream like /YYY/) | sort @timestamp desc | limit 20') |
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 main | |
| import ( | |
| "encoding/binary" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" | |
| "os" | |
| "strconv" |
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
| #!/usr/bin/env | |
| docker run --interactive --tty --rm --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate engines:install | |
| docker run --interactive --tty --rm --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f text |
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
| vagrant init centos/7 | |
| vagrant up && vagrant ssh | |
| sudo yum install -y epel-release && sudo yum install -y docker npm git | |
| git clone https://github.com/portainer/portainer.git && cd portainer | |
| sudo ln -s /usr/bin/sha1sum /usr/bin/shasum | |
| npm install && sudo npm i -g grunt | |
| sudo systemctl start docker && sudo chmod o+rw /var/run/docker.sock && sudo setenforce 0 | |
| grunt build | |
| grunt run-dev |
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
| rpm -qa --queryformat '%{size} %{name}\n' | sort -rn | more |
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
| require 'logger' | |
| module Dim | |
| class Logger < ::Logger | |
| def initialize(*) | |
| super | |
| @formatter = NoTimestampFormatter.new | |
| end | |
| end |
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 | |
| if [ "$#" -eq 0 ]; then | |
| echo "Usage: unpackWAR war_file destination" | |
| echo "Usage: curl -L war_url | unpackWAR destination" | |
| elif [ "$#" -eq 1 ]; then | |
| DEST=$1 | |
| mkdir -p $DEST | |
| cat /dev/stdin | bsdtar -xvf - -C $DEST | |
| elif [ "$#" -eq 2 ]; then |
NewerOlder