This file contains 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
version: '3' | |
services: | |
influxdb: | |
image: influxdb:latest | |
ports: | |
- '8086:8086' | |
volumes: | |
- ./data/influxdb:/var/lib/influxdb2 | |
environment: |
This file contains 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
# `docker:latest` image uses base alpine linux | |
# This script allows installing awscliv2 which requires | |
# gcc buildtools (instead of default `musl` in alpine) | |
# https://stackoverflow.com/questions/60298619/awscli-version-2-on-alpine-linux | |
GLIBC_VER=2.31-r0 | |
# install glibc compatibility for alpine | |
apk --no-cache add \ | |
binutils \ | |
jq \ |
This file contains 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 | |
# | |
# CurlBench. Dont want to install apache bench? | |
# | |
# Runs "curl" concurrently using arguments. | |
# | |
# Example: Make 100 requests to some domain (concurrency = 10) | |
# $ curl.sh http://some.domain.com 100 10 | |
# | |
set -B |
This file contains 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
**Describe the bug** | |
A clear and concise description of what happens. | |
Hiya. Thanks for putting together this awesome library. | |
We're trying to validate a response schema as follows: |
This file contains 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
/* | |
* Async.gs | |
* | |
* Manages asyncronous execution via time-based triggers. | |
* | |
* Note that execution normally takes 30-60s due to scheduling of the trigger. | |
* | |
* @see https://developers.google.com/apps-script/reference/script/clock-trigger-builder.html | |
*/ |
This file contains 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
# Generate JWT public/private key pair for use in JWT (ES256 algorithm) | |
openssl ecparam -name secp256r1 -genkey -out jwt.es256.priv | |
openssl ec -in jwt.es256.priv -pubout -outform PEM -out jwt.es256.pub | |
# Create PKCS8 format | |
openssl pkcs8 -topk8 -inform PEM -outform DER -in jwt.es256.priv -out jwt.es256.pkcs8 -nocrypt | |
base64 -i jwt.es256.pkcs8 > jwt.es256.pkcs8.base64 |
This file contains 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
#1 Openssh server | |
sudo apt install -y openssh-server | |
sudo systemctl enable ssh | |
sudo systemctl start ssh | |
sudo ufw enable | |
sudo ufw allow ssh | |
#2 Docker (https://docs.docker.com/engine/install/ubuntu/) | |
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
This file contains 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 | |
# @see https://stackoverflow.com/questions/33243121/abuse-curl-to-communicate-with-redis | |
# Without any tools | |
exec 3<>/dev/tcp/$REDIS_HOST/6379 && echo -e "PING\r\n" >&3 && head -c 7 <&3 | |
# With netcat (apt install netcat-traditional) | |
(printf "PING\r\n";) | nc $REDIS_HOST 6379 | |
# With telnet |
This file contains 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
<html> | |
<body> | |
<h1>JWT ES256 Encoding and decoding in plain JavaScript (Web Crypto API)</h1> | |
<textarea id="log" style="width: 100%; height: 400px;"></textarea> | |
</body> | |
<script> | |
/// | |
/// PLEASE BE AWARE | |
/// IT IS GENERALLY A BAD IDEA TO GENERATE JWT TOKENS IN THE BROWSER | |
/// THIS SHOULD ONLY BE USED FOR TESTING PURPOSES |
This file contains 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
// @see https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens | |
// ======================= | |
// get the packages we need ============ | |
// ======================= | |
var express = require('express'); | |
var app = express(); | |
var bodyParser = require('body-parser'); | |
var morgan = require('morgan'); | |
var mongoose = require('mongoose'); |
NewerOlder