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
package io.jenkins.infra.sealedbox4j; | |
import org.kocakosm.jblake2.Blake2b; | |
import javax.crypto.AEADBadTagException; | |
import java.util.Arrays; | |
import static com.neilalexander.jnacl.crypto.curve25519.crypto_scalarmult_base; | |
import static com.neilalexander.jnacl.crypto.curve25519xsalsa20poly1305.*; |
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
package io.jenkins.plugins.keystore; | |
import hudson.init.InitMilestone; | |
import hudson.init.Initializer; | |
import jenkins.model.Jenkins; | |
import jenkins.security.ConfidentialKey; | |
import jenkins.security.ConfidentialStore; | |
import org.apache.commons.io.IOUtils; | |
import javax.annotation.CheckForNull; |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache license, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
pipeline { | |
agent any | |
// user credentials as build parameters | |
/* | |
parameters { | |
credentials(credentialType: 'com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl', | |
defaultValue: '', | |
description: 'Production deployment key', | |
name: 'deployKey', | |
required: true) |
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
// build parameters can insert user credentials for the entire pipeline | |
/* | |
properties([ | |
parameters([ | |
credentials(credentialType: 'com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl', | |
defaultValue: '', | |
description: 'Production deployment key', | |
name: 'deployKey', | |
required: true) | |
]) |
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
package graph | |
trait Graph[+A] { | |
def isEmpty: Boolean | |
def size: Int | |
def contains[A0 >: A](vertex: A0): Boolean | |
def +[A0 >: A](vertex: A0): Graph[A0] |
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
// adapted from this great paper: | |
// https://themonadreader.files.wordpress.com/2014/04/fizzbuzz.pdf | |
def fb(n: Int): String = { | |
def test(d: Int, s: String)(x: String ⇒ String)(v: String): String = | |
if (n % d == 0) s + x("") else x(v) | |
(test(3, "fizz") _ compose test(5, "buzz"))(identity)(n.toString) | |
} |
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
import akka.NotUsed | |
import akka.actor.ActorRef | |
import akka.pattern.AskableActorRef | |
import akka.stream.scaladsl.Source | |
import akka.util.Timeout | |
import scala.reflect.ClassTag | |
/** | |
* Generic oracle that answers queries with streams. |
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
package avro.akka.ipc | |
import java.nio.ByteBuffer | |
import java.util.{ArrayList => AList, List => JList} | |
import akka.NotUsed | |
import akka.actor.{Actor, Props} | |
import akka.stream.Materializer | |
import akka.stream.scaladsl.Tcp.ServerBinding | |
import akka.stream.scaladsl.{BidiFlow, Flow, Framing, Tcp} |
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
trait DefPwS { | |
def get(list: Boolean) = if (list) List(1, 2, 3) else (1, 2, 3) // warn | |
} | |
trait ValPwS { | |
val foo = if (true) List(1, 2) else (1, 2) // warn | |
} | |
trait ParamPwS { | |
def f[A](as: A*) = 42 |
NewerOlder