Inspired By: grafana/loki#333
- docker-compose.yml
version: "3"
networks:
loki:
| openapi: 3.0.0 | |
| info: | |
| title: Hashicups | |
| description: Products API allows access to HashiCoffee Coffees and Ingredients | |
| version: 1.0.0 | |
| servers: | |
| - url: http://{{baseurl}} | |
| components: | |
| securitySchemes: | |
| noauthAuth: |
| #!/bin/bash | |
| sudo apt-get remove --purge $(grep -A 3 "$1" /var/log/apt/history.log | tail -1 | sed 's/Install: //' | tr ',' '\n' | sed '/automatic)/d' | awk '{ print $1}' | sed 's/:amd64//') |
| #!/bin/ash | |
| # Usage: cat /id_token.txt | jwt-decode.sh --no-verify-sig" > jwt_payload.json | |
| . /usr/share/libubox/jshn.sh | |
| base64_padding() | |
| { | |
| local len=$(( ${#1} % 4 )) | |
| local padded_b64='' | |
| if [ ${len} = 2 ]; then | |
| padded_b64="${1}==" |
| #!/bin/sh | |
| # Decode a JWT from stdin and verify it's signature with the JWT issuer public key | |
| # Only RS256 keys are supported for signature check | |
| # | |
| # Put OAuth server public key in PEM format to /var/cache/oauth/$JWT_KID.key.pub.pem | |
| # You must create the folder first | |
| # $ sudo mkdir -p /var/cache/oauth/ | |
| # To converted key from JWK to PEM use https://8gwifi.org/jwkconvertfunctions.jsp or https://keytool.online/ | |
| # NOTE: For Google you can get the keys in PEM format via https://www.googleapis.com/oauth2/v1/certs | |
| # Decode the keys with decodeURIComponent() |
| { | |
| "openapi": "3.0.0", | |
| "tags": [ | |
| { | |
| "name": "Open Service Broker API Specification" | |
| } | |
| ], | |
| "info": { | |
| "title": "Open Service Broker API", | |
| "description": "The Open Service Broker API defines an HTTP(S) interface between Platforms and Service Brokers.", |
| 1) create a file squid.conf | |
| ``` | |
| acl denydomain dstdomain .bbc.com | |
| http_access deny denydomain | |
| acl allowdomain dstdomain .yahoo.com | |
| http_access allow allowdomain | |
| http_access deny all |
Inspired By: grafana/loki#333
version: "3"
networks:
loki:
| --- | |
| - hosts: legacyservers | |
| gather_facts: yes | |
| become: yes | |
| tasks: | |
| # Use a block to perform tasks conditionally—only if running Ubuntu 18.04. | |
| - block: |
| #!/usr/bin/env bash | |
| # https://gist.github.com/gretel/34008d667a8a243a9682e5207619ad95 | |
| # 2016 tom hensel <[email protected]> | |
| # `vagrant` on `ubuntu-16.04` can get in conflict with *unattended-upgrade* running and locking the `dpkg` subsystem. this script waits gracefully | |
| # in `Vagrantfile`: | |
| # config.vm.provision 'Wait for unattended-upgrades', type: 'shell', path: './provisioning/wait_unattended_upgrades.sh', args: %w( dpkg apt unattended-upgrade ) | |
| # | |
| function wait_procnames { | |
| while true; do |