Skip to content

Instantly share code, notes, and snippets.

View gushernobindsme's full-sized avatar

eratakumi gushernobindsme

View GitHub Profile
@gushernobindsme
gushernobindsme / build.gradle
Created February 5, 2019 09:20
aneki-api's build.gradle
buildscript {
ext {
springBootVersion = '2.0.7.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@gushernobindsme
gushernobindsme / AWSKMSSample.java
Created June 7, 2017 05:15
AWS Key Management Serviceのencrypt、decrypt実装サンプル
private String encrypt(){
String keyId = "arn:aws:kms:...";
ByteBuffer plaintext = ByteBuffer.wrap("plainText".getBytes());
EncryptRequest req = new EncryptRequest()
.withKeyId(keyId)
.withPlaintext(plaintext);
ByteBuffer ciphertext = AWSKMSClient.encrypt(req).getCiphertextBlob();
return Base64.getEncoder().encodeToString(ciphertext.array());
}
@gushernobindsme
gushernobindsme / CallableSample.java
Created May 30, 2017 21:17
Callableインタフェースサンプル実装
import java.util.Date;
import java.util.concurrent.*;
/**
* Created by eratakumi on 2017/05/31.
*/
public class CallableSample {
public static void main(String[] args){
ExecutorService ex = Executors.newSingleThreadExecutor();
System.out.println("Start : " + new Date());