Extrapolated from a combination of:
- https://gist.github.com/hanvari/5c0d9ffd061e89020b4b8a489eff8344
- https://gitlab.com/BenjaminDobell/Heimdall/-/merge_requests/470/diffs
Open Terminal
| # top-most EditorConfig file | |
| root = true | |
| [*.go] | |
| ij_formatter_enabled = false | |
| [*] | |
| # Unix-style newlines with a newline ending every file | |
| end_of_line = lf | |
| insert_final_newline = true |
| #!/bin/sh | |
| TARGET=$1 | |
| if [ -z "$TARGET" ]; then | |
| echo "no target container specified" | |
| exit 1 | |
| fi | |
| docker container inspect $TARGET >/dev/null |
| # This workflow will tag a release on github when the package.json version changes on master, and publish package to npm and github | |
| name: Tag Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: |
| # What's running on a specified port? | |
| # https://gist.github.com/TomK/b8c5bebe1e29f62d3ecff7e5223c8ff6 | |
| if [ -z "$1" ]; then | |
| echo 'You must specify a port' | |
| exit 1 | |
| fi | |
| PIDS=$(lsof -nP -i:$1 |grep LISTEN |awk '{print $2}') |
| #!/bin/bash | |
| # get authoritiy | |
| AUTHORITY=$(dig +noall +trace $1 NS | grep '\tNS\t' | tail -n1 | awk '{print $5}') | |
| echo "AUTHORITY: $AUTHORITY" | |
| Q=$1 | |
| shift | |
| dig @$AUTHORITY ${@:-ANY} +noall +answer $Q |
Extrapolated from a combination of:
Open Terminal
| defaults: &defaults | |
| steps: | |
| # common php steps | |
| - run: echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories | |
| - run: if [ -n "$ADD_PACKAGES" ]; then apk -U add $ADD_PACKAGES; fi; | |
| - run: if [ -n "$ADD_MODULES" ]; then docker-php-ext-install $ADD_MODULES; fi; | |
| - run: | | |
| if [ -n "$ADD_PECL" ]; then | |
| docker-php-source extract \ | |
| && apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS $ADD_PHPIZE_DEPS \ |
| #!/bin/bash | |
| CONC=10 | |
| HOST="--host=rabbit.fortifi.uk" | |
| echo "Listing connections..." | |
| rabbitapi $HOST -f tsv -q list connections name state |grep closed |awk '{$NF=""; print $0}' > conn.txt | |
| echo "Found $(wc -l conn.txt) closed connections" | |
| I=0 |
| # Copyright 2017 Google Inc. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| #!/bin/bash | |
| set -e | |
| CERT_PREFIX="$1" | |
| CERT_PATH="$2" | |
| CERT_KEY="$3" | |
| if [[ $CERT_PREFIX == "" || $CERT_PATH == "" || $CERT_KEY == "" ]]; then | |
| echo "Usage: update-ssl.sh <cert prefix> <cert path> <cert key>" |