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
import java.io.ByteArrayOutputStream | |
import java.util.zip.Deflater | |
import java.util.zip.Inflater | |
/** | |
* Compress a string using ZLIB. | |
* | |
* @return an UTF-8 encoded byte array. | |
*/ | |
fun String.zlibCompress(): ByteArray { |
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
import java.io.ByteArrayInputStream | |
import java.io.ByteArrayOutputStream | |
import java.util.zip.GZIPInputStream | |
import java.util.zip.GZIPOutputStream | |
/** | |
* Compress a string using GZIP. | |
* | |
* @return an UTF-8 encoded byte array. |
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
#version 150 | |
uniform float time; | |
uniform vec2 resolution; | |
uniform vec2 mouse; | |
uniform vec3 spectrum; | |
uniform sampler2D texture0; | |
out vec4 fragColor; |
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
#version 150 | |
uniform float time; | |
uniform vec2 resolution; | |
uniform vec2 mouse; | |
uniform vec3 spectrum; | |
uniform sampler2D texture0; | |
uniform sampler2D texture1; | |
uniform sampler2D texture2; |
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
class MyTest { | |
lateinit var subject: TestSubject | |
@SetUp fun setup() { | |
subject = TestSubject() | |
} | |
@Test fun test() { | |
subject.method() // dereference directly | |
} |
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
Accept-Encoding: gzip | |
Accept-Language: en-US;q=1.0 | |
Authorization: Bearer 2528dfc64a2f3a09b315dc64f73796711a05fa7f161cdee45ff8e0ef17ea543d | |
Connection: Keep-Alive | |
Content-Length: 109813 | |
Content-Type: application/json; charset=UTF-8 | |
Host: testaka3.sogei.it | |
Immuni-Dummy-Data: 0 | |
User-Agent: Immuni |
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
Accept-Encoding: gzip | |
Accept-Language: en-US;q=1.0 | |
Authorization: Bearer 541f51af2878529f692094b222827e53bf83a0f61553932b2c91bc9ff959c514 | |
Connection: Keep-Alive | |
Content-Length: 109813 | |
Content-Type: application/json; charset=UTF-8 | |
Host: api.staging.dec-poc1.immuni.org | |
Immuni-Dummy-Data: 0 | |
User-Agent: Immuni |
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
import javax.crypto.Cipher; | |
import java.security.spec.KeySpec; | |
import javax.crypto.spec.PBEKeySpec; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.SecretKeyFactory; | |
import java.security.AlgorithmParameters; | |
import javax.crypto.spec.IvParameterSpec; | |
public class Decrypter { |
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
import org.junit.rules.TestWatcher | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.test.* | |
import org.junit.runner.Description | |
@ExperimentalCoroutinesApi | |
class CoroutineTestRule(val dispatcher: TestCoroutineDispatcher = TestCoroutineDispatcher()) : TestWatcher() { | |
override fun starting(description: Description?) { |
NewerOlder