Test relative URL
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
function jwt_decode() { | |
jq -R 'split(".") | .[0] | @base64d | fromjson' <<< "$1" | |
jq -R 'split(".") | .[1] | @base64d | fromjson | if .iat then (.iat_str = (.iat|gmtime|strftime("%Y-%m-%dT%H:%M:%S %Z"))) else . end | if .exp then (.exp_str = (.exp|gmtime|strftime("%Y-%m-%dT%H:%M:%S %Z"))) else . end | if .nbf then (.nbf_str = (.nbf|gmtime|strftime("%Y-%m-%dT%H:%M:%S %Z"))) else . end' <<< "$1" | |
} |
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
{ | |
"clientId": "otoroshi", | |
"name": "otoroshi", | |
"description": "otoroshi", | |
"rootUrl": "http://localhost:8080", | |
"adminUrl": "http://localhost:8080/*", | |
"surrogateAuthRequired": false, | |
"enabled": true, | |
"alwaysDisplayInConsole": false, | |
"clientAuthenticatorType": "client-x509", |
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 otoroshi.plugins.defer | |
import akka.http.scaladsl.util.FastFuture | |
import akka.stream.Materializer | |
import env.Env | |
import org.joda.time.DateTime | |
import otoroshi.script._ | |
import play.api.libs.json._ | |
import play.api.mvc.Result |
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
/* | |
"dependencies": { | |
"bcrypt": "3.0.3", | |
"node-jsencrypt": "1.0.0" | |
} | |
*/ | |
const bcrypt = require('bcrypt'); | |
const JSEncrypt = require('node-jsencrypt'); | |
const _crypto = require('crypto'); |
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 | |
set -e | |
outfile= | |
passfile= | |
pin= | |
encKey=01 | |
action=encrypt |
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
xrandr --output DP-1 --set underscan on | |
xrandr --output DP-1 --set "underscan hborder" 31 --set "underscan vborder" 42 |
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
const fetch = require('node-fetch'); | |
const base64 = require('base-64'); | |
const argv = require('minimist')(process.argv.slice(2)); | |
const OTOROSHI_URL = argv['otoroshi-url'] || 'http://otoroshi-api.foo.bar' | |
const APIKEY_ID = argv['otoroshi-apikey-id'] || 'admin-api-apikey-id' | |
const APIKEY_SECRET = argv['otoroshi-apikey-secret'] || 'admin-api-apikey-secret' | |
const SERVICE_FROM = argv['service-from'] || '--'; | |
const SERVICE_TO = argv['service-to'] || '--'; |
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
const http = require('http'); | |
const url = require('url'); | |
const faker = require('faker'); | |
const bytes = require('bytes'); | |
const _ = require('lodash'); | |
const port = process.env.PORT || process.argv[2] || 8080; | |
const cache = {}; |
NewerOlder