Skip to content

Instantly share code, notes, and snippets.

@ttomsu
ttomsu / gist:2668256021c0b9a9213200004cb83acb
Last active February 3, 2017 21:16
Using OpenSSL to generate and sign Server and Client SSL certificates
# Create keys
openssl genrsa -des3 -out ca.key 4096
openssl genrsa -des3 -out server.key 4096
openssl genrsa -des3 -out client.key 4096
# Self-sign CA certificate
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# Generate server and client certificate signing requets
openssl req -new -key server.key -out server.csr
@ttomsu
ttomsu / JsonSchemaValidationSpec.groovy
Last active July 17, 2018 12:14
Testing out JSON Schema validator
/*
* Copyright 2016 Google, Inc.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@ttomsu
ttomsu / JsonSetterSpec.groovy
Last active January 12, 2016 20:30
Here's an example of using @JsonSetter annotations as a "preprocessor"-like way to move clients using old API while still being able to update Orca's internal model.
/*
* Copyright 2016 Google, Inc.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
@ttomsu
ttomsu / JsonSetterSpec.groovy
Created January 5, 2016 21:47
Here's an example of using @JsonSetter annotations as a "preprocessor"-like way to move clients using old API while still being able to update Orca's internal model.
/*
* Copyright 2016 Google, Inc.
*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software