Skip to content

Instantly share code, notes, and snippets.

View dotkebi's full-sized avatar

Myoung-jin, Ko dotkebi

View GitHub Profile
//
// CastPlayerViewController.swift
// BasicCastPlayer
//
// Copyright © 2020 Brightcove, Inc. All rights reserved.
//
import UIKit
import GoogleCast
import SnapKit
@dotkebi
dotkebi / setup.config
Created March 23, 2020 14:21 — forked from miguelmota/setup.config
Elastic Beanstalk NGINX rewrite http to https using .ebextensions
files:
"/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf":
mode: "000755"
owner: root
group: root
content: |
server {
listen 80;
gzip on;
@dotkebi
dotkebi / NSData+AES.swift
Last active June 12, 2023 08:59
Swift AES Extensions
import Foundation
extension NSData {
func encryptAES128(key: NSString, iv: NSString) -> NSData? {
return aes128(method: CCOperation(kCCEncrypt), key: key, iv: iv)
}
func decryptAES128(key: NSString, iv: NSString) -> NSData? {
return aes128(method: CCOperation(kCCDecrypt), key: key, iv: iv)
@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 = {
@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 / ResponseBodyExampleController3.java
Created May 19, 2017 05:03
ResponseBodyExampleController3
@Controller
public class ResponseBodyExampleController3 {
@ResponseBody
@GetMapping("/")
public 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";
}
@Controller
public class ResponseBodyExampleController1 {
@GetMapping("/")
public @ResponseBody String someMethod() {
return "result";
}
}
@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);
}
@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<>();