I hereby claim:
- I am adrobisch on github.
- I am adrobisch (https://keybase.io/adrobisch) on keybase.
- I have a public key ASDZGgRPX0TFWyhUI6YPnJvNMcftYipQjZcYB_DqSbEUaQo
To claim this, I am signing this object:
| tracing-log = "0.1" | |
| tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } | |
| tracing-serde = "0.1" | |
| chrono = { version = "0.4", default-features = false, features = ["clock"] } |
| package stop | |
| import cats.effect.std.Queue | |
| import cats.effect.{ExitCode, IO, IOApp} | |
| import fs2._ | |
| import fs2.concurrent.SignallingRef | |
| import sun.misc.{Signal, SignalHandler} | |
| import java.time.LocalDateTime | |
| import scala.concurrent.duration.DurationInt |
| import $ivy.`io.circe::circe-core:0.10.0`;import $ivy.`io.circe::circe-generic:0.10.0`;import $ivy.`io.circe::circe-parser:0.10.0` | |
| import sys.process._ | |
| import io.circe._ | |
| @doc("This script updates the awscli profile with the keys and the session token from AWS") | |
| @main def authenticate(mfaArn: String @doc("// you can find the mfa arn in https://console.aws.amazon.com/iam/home#/users/<your aws console login username>?section=security_credentials"), | |
| token: String @doc("the token code from you authenticator app e.g. Google Authenticator or Authy"), | |
| @doc("the profile to use to get the session token, you can configure it with `aws configure --profile <profile name>`") stsProfile: String = "mfa", | |
| @doc("the profile to store the session keys and session token") sessionProfile: String = "mfa-session") = { | |
| assert(!stsProfile.equals(sessionProfile), "sts profile and session profile must not be the same") |
I hereby claim:
To claim this, I am signing this object:
| #%RAML 1.0 | |
| title: HATEOAS example | |
| types: | |
| Link: | |
| type: object | |
| properties: | |
| rel: string | |
| href?: | |
| type: string |
| var AutenticationInterceptor = ['$q', '$window', function($q, window) { | |
| return { | |
| response: function(response) { | |
| return response || $q.when(response); | |
| }, | |
| responseError: function(rejection) { | |
| if (rejection.status === 401) { | |
| window.location.href = "login.html"; | |
| } | |
| return $q.reject(rejection); |
| /** | |
| Usage | |
| ===== | |
| XmlBuilder xml = new XmlBuilder(outputStream); | |
| xml.start() | |
| .tag("version", versionTag -> versionTag.content(pojo.getVersion())) | |
| .tag("time", timeTag -> timeTag.content(pojo.getTime())) | |
| .tag("data", dataTag -> { |
| import com.typesafe.sbt.SbtNativePackager._ | |
| import NativePackagerKeys._ | |
| net.virtualvoid.sbt.graph.Plugin.graphSettings | |
| packageArchetype.java_application | |
| organization := "com.example" | |
| name := "example" |
| #%RAML 0.8 | |
| title: World Music API | |
| baseUri: http://example.api.com/{version} | |
| version: v1 | |
| schemas: | |
| - halLink: | | |
| { "$schema": "http://json-schema.org/schema", | |
| "type": "object", | |
| "description": "a Hypertext Application Language link", |