Skip to content

Instantly share code, notes, and snippets.

View pbernet's full-sized avatar

Paul Bernet pbernet

  • Zürich
View GitHub Profile
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpRequest
import org.slf4j.{Logger, LoggerFactory}
import java.net.URLEncoder
import scala.concurrent.Future
import scala.concurrent.duration.DurationInt
import scala.util.{Failure, Success}
...
vault secrets enable transit
echo "Create a named encryption key"
vault write -force transit/keys/master-key
echo "Read the corresponding 'datakey' (with Admin token)"
RESPONSE_DATA_KEY=`vault write -force transit/datakey/plaintext/master-key`
echo "RESPONSE_DATA_KEY:" $RESPONSE_DATA_KEY
VAULT_DATAKEY_CIPHERTEXT=`echo $RESPONSE_DATA_KEY | grep -Po '(vault:v1:)\S{80}'`
@pbernet
pbernet / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
@pbernet
pbernet / Browser.scala
Created October 23, 2012 16:14
Browser
package xx.testcase.gui
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.WebDriverBackedSelenium
import org.openqa.selenium.remote.RemoteWebDriver
import org.openqa.selenium.firefox.internal.ProfilesIni
import java.io.File
import net.liftweb.util.Helpers
object Browser {
@pbernet
pbernet / MyGUITest.scala
Created October 23, 2012 16:12
MyGUITest
package xx.testcase.gui
import exception.LinkNotFoundException
import pageobjects.page._
import xx.testpool.Users
import util.I18N
import xx.util.Utils
class MyGUITest extends GUISpecificationCARE {
@pbernet
pbernet / CareWebPage.scala
Created October 23, 2012 16:09
CareWebPage
package xx.testcase.gui.pageobjects.page
import org.openqa.selenium.{By, JavascriptExecutor, WebDriverBackedSelenium}
import net.liftweb.util.Helpers
import net.liftweb.common.{Failure, Full}
import com.thoughtworks.selenium.SeleniumException
import org.openqa.selenium.support.ui.{ExpectedConditions, WebDriverWait}
import xx.testcase.gui.exception.LinkNotFoundException
trait CareWebPage {
@pbernet
pbernet / LoginPage.scala
Created October 23, 2012 16:05
LoginPage
package xx.testcase.gui.pageobjects.page
import org.openqa.selenium.WebDriverBackedSelenium
import xx.testcase.gui.util.I18N
class LoginPage(sel: WebDriverBackedSelenium) extends CareWebPage {
def selenium = sel
def isAt = selenium.getTitle.contains(I18N.getOrEmpty("config.login.title"))