Skip to content

Instantly share code, notes, and snippets.

View dotkebi's full-sized avatar

Myoung-jin, Ko dotkebi

View GitHub Profile
@dotkebi
dotkebi / mavenTest.sh
Created September 1, 2016 11:00
maven test case
#!/bin/bash
mvn test -Dtest={testClassName}
@dotkebi
dotkebi / ApplicationComponent.java
Created September 6, 2016 03:01
Dagger2 best practices I think :)
@Singleton
@Component(
modules = {
AppModule.class
})
public interface ApplicationComponent {
void inject(MainActivity target);
final class Initializer {
@dotkebi
dotkebi / BizSenderBuilder.java
Last active October 11, 2016 06:13
Biz Purio SMS builder
/**
* BizPurio 메시지 전송 class build
* @author by dotkebi@gmail.com on 2016-10-11.
*/
public class BizSenderBuilder {
private BizSend bizSend;
private String ip;
private int port;
@dotkebi
dotkebi / CSVwriter.java
Created April 24, 2017 11:03
CSVWriter with reflection
public class CSVWriter {
private static final String UTF8_BOM = "\uFEFF";
public void convert(HttpServletResponse response, List<?> datas, String name) {
write(response, transform(datas), name);
}
private List<String[]> transform(List<?> objects) {
List<String[]> dataToWrite = new ArrayList<>();
@dotkebi
dotkebi / CSVWritable.java
Created May 1, 2017 05:49
CSVWritable interface
/**
* @author by dotkebi@gmail.com on 2017-5-1.
*/
public interface CSVWritable {
void write(OutputStream outputStream, List<String[]> datas);
}
@Controller
public class ResponseBodyExampleController1 {
@GetMapping("/")
public @ResponseBody String someMethod() {
return "result";
}
}
@dotkebi
dotkebi / ResponseBodyExampleController2.java
Created May 19, 2017 05:02
ResponseBodyExampleController2
@Controller
public class ResponseBodyExampleController2 {
@GetMapping("/")
public
@ResponseBody
String someMethod() {
return "result";
}
@dotkebi
dotkebi / ResponseBodyExampleController3.java
Created May 19, 2017 05:03
ResponseBodyExampleController3
@Controller
public class ResponseBodyExampleController3 {
@ResponseBody
@GetMapping("/")
public String someMethod() {
return "result";
}
}
@dotkebi
dotkebi / ExampleMatacherTest.java
Created June 14, 2017 11:39
ExampleMatacherTest.java
@RunWith(SpringRunner.class)
@SpringBootTest
public class ExampleMatcherTest {
@Autowired
private ExampleRepository repository;
@Test
public void exampleTest() {
Child child = new Child();
@dotkebi
dotkebi / ReduxNavigation.js
Created January 31, 2018 20:27 — forked from iesteban/ReduxNavigation.js
Multiple routers with Drawer ReduxNavigation
import React from "react"
import * as ReactNavigation from "react-navigation"
import { connect } from "react-redux"
import AppNavigation from "./AppNavigation"
import { BackHandler } from "react-native"
import PropTypes from "prop-types"
class ReduxNavigation extends React.Component {
static propTypes = {