Skip to content

Instantly share code, notes, and snippets.

Yusuke Kawata yusuke2255

Block or report user

Report or block yusuke2255

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yusuke2255
yusuke2255 / aws-init-setting.yml
Created Mar 3, 2015
【メモ】ansibleでAWSのEC2インスタンスの基本設定をするplaybook ref: http://qiita.com/Kawata/items/d34dda5de93564873ae7
View aws-init-setting.yml
- hosts: '{{host_name}}'
sudo: yes
roles:
- common
- aws/common
- aws/amazon-linux-init
@yusuke2255
yusuke2255 / build.gradle
Created Mar 20, 2015
【メモ】DropwizardでCookieのsession idで認証してみる ref: http://qiita.com/Kawata/items/2e8453ac149e365f762a
View build.gradle
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.0'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'application'
@yusuke2255
yusuke2255 / file0.java
Created May 5, 2015
【メモ】Dropwizardで複数のデータベース(HibernateBundle)を使う ref: http://qiita.com/Kawata/items/872368226388204b02b3
View file0.java
package jp.hoge;
import java.util.HashMap;
import java.util.Map;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
@yusuke2255
yusuke2255 / ReduceTest.java
Created Aug 5, 2015
[Java8] Stream reduce sample
View ReduceTest.java
import java.util.Arrays;
import java.util.Optional;
public class ReduceTest {
public static void main(String[] args) {
Optional<Sum> summary = Arrays.asList(new Sum(1, 10),new Sum(2, 15),new Sum(3, 5)).stream().reduce((sum1,sum2) -> {
if (Optional.ofNullable(sum1).isPresent() == false) {
System.out.println("Sum1 is empty.");
return sum2;
@yusuke2255
yusuke2255 / SampleResource.java
Created Aug 27, 2015
画像を返すDropwizardリソース
View SampleResource.java
package my.sample.resources;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
View gist:5eb3b439410c99b28dd1517f4167cfc7
https://beroux.com/english/articles/kubernetes/?part=3
You can’t perform that action at this time.